Jump to content

Making VBA programs run by Hot Keys or menus


muck
 Share

Recommended Posts

Is it possable to make a VBA Program start running using a menu pick or a hot

key. What is the easyest way to make a VBA program pop up in AutoCAD 2010

Thank you,

Link to comment
Share on other sites

Here is a code example just put it in your autoload file

 

(defun C:vbadrn ()

(vl-vbaload "S:/AutoDESK/VBA/vbadrains.dvb")

(vl-vbarun "pitscheduleupdate")

)

 

you can either type vbadrn or assign it to a menu ^c^cvbadrn or again in the menu ^c^c(vl-vbaload S:/AutoDESK/VBA/vbadrains.dvb") (vl-vbarun "pitscheduleupdate")

Link to comment
Share on other sites

I guess by your question that your running a VBA that some else has written, to answer though the question there is two steps.

 

1 Load a VBA program it can contain many different routines within it. "VBDRAINS.dvb"

 

2 Run a particular sub routine within the VBA program "pitschedule"

 

If your VBA is already loaded as part of your statrtup proceedure then you only need step2 to run.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...