Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Sep 16, 2003
Messages
30
Location
AU
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.
 
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

Back
Top