08-11-2016
11:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-11-2016
11:03 PM
Hi,
Then this is what you need
'Open BOM editor dialog box
Dim oCtrlDef As ControlDefinition
oCtrlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyBillOfMaterialsCmd")
oCtrlDef.ExecuteIf you want to print all commandnames, there is a snippet in de vba help that does this, very helpfull and i have this file all the time with me ![]()
Sub PrintCommandNames()
Dim oControlDefs As ControlDefinitions
Set oControlDefs = ThisApplication.CommandManager.ControlDefinitions
Dim oControlDef As ControlDefinition
Open "C:\temp\CommandNames.txt" For Output As #1
Print #1, Tab(10); "Command Name"; Tab(75); "Description"; vbNewLine
For Each oControlDef In oControlDefs
Print #1, oControlDef.InternalName; Tab(55); oControlDef.DescriptionText
Next
Close #1
End Sub
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
please feel free to "kudos"