AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Distinguished Contributor
Posts: 231
Registered: ‎11-06-2006
Message 1 of 2 (87 Views)

Adding a buttom to a tool bar that triggers a VB code.

87 Views, 1 Replies
08-13-2012 10:03 AM



I have a couple of VB pieces of code that set up the standards of my company. What I want to do create a buttom in my Workspace -within a tab created by me with the CUI tools- and trigger my VB code.



How is possible to create this buttom?


Thanks in advance





Posts: 2,757
Registered: ‎05-13-2003
Message 2 of 2 (70 Views)

Re: Adding a buttom to a tool bar that triggers a VB code.

08-14-2012 01:59 PM in reply to: RafaelMoreno

You'll get better help posting in the customization group.


In the meantime, I think the general form of a CUI macro to run VBA is:


^C^C^P(command "-vbaload" "MyVB")(command "-vbarun" "MyVB")(command "vbaunload" "MyVB") 


(Note that the macro needs one space after the last parenthesis.)

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.