Excel Macro, need to use key combination in macro

In Excel I can access a function by pressing the Alt key, then the S key, then the R key and then the D key

I want to put this in a macro format where I run it and it would send these keys in Excel.

I have been trying the Application.sendkey without any luck.
wilpitzAsked:
Who is Participating?
 
Martin LissConnect With a Mentor Older than dirtCommented:
Just in case, to send Alt+S do

Application.SendKeys("%S")
0
 
Martin LissOlder than dirtCommented:
Are you trying to send Alt+SRD ?
0
 
wilpitzAuthor Commented:
No it needs to be each single key
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Martin LissOlder than dirtCommented:
So Alt, the S then R then D? or Alt+S, Alt+R, Alt+D?
0
 
wilpitzAuthor Commented:
Yep got it to work!

Application.SendKeys ("%S")
Application.SendKeys ("R")
Application.SendKeys ("D")
0
 
Martin LissOlder than dirtCommented:
I'm glad I was able to help.

Marty - MVP 2009 to 2012
0
All Courses

From novice to tech pro — start learning today.