• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD 2013/2014 DWG Format

    Reply
    Distinguished Contributor
    Posts: 186
    Registered: ‎11-06-2006

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

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

    Hi:

     

    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

     

     

     

    Rafael

    Please use plain text.
    Distinguished Mentor
    Posts: 1,566
    Registered: ‎05-13-2003

    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.)

    Please use plain text.