Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Repeat Last Command" macro

Status
Not open for further replies.

kris44

Mechanical
Sep 16, 2003
30
Let me start by saying I have plenty of experience with Excel VBA but none with Solidworks VBA.
I am looking to add a button to the 'shortcut' toolbar that will repeat the last command. I currently have 'R' as my keyboard shortcut, but want to be able to click a button instead.
cheers.
 
Replies continue below

Recommended for you

The quick'n'dirty way would be SendKeys("R")

-handleman, CSWP (The new, easy test)
 
The 'SendKeys' method does not work for me.

If I have VBA Editor closed the only thing that happens is NumLock is turns off.

If I have VBA Editor open & then run the macro from SW it will
1. Turn off NumLock
2. Insert letter 'R' into code

So I know the code is sending 'R', but SW is not responding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor