Solved

Excel Macro, need to use key combination in macro

Posted on 2013-02-06
6
332 Views
Last Modified: 2013-02-07
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.
0
Comment
Question by:wilpitz
  • 4
  • 2
6 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38861859
Are you trying to send Alt+SRD ?
0
 

Author Comment

by:wilpitz
ID: 38861870
No it needs to be each single key
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38861878
So Alt, the S then R then D? or Alt+S, Alt+R, Alt+D?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 38861885
Just in case, to send Alt+S do

Application.SendKeys("%S")
0
 

Author Closing Comment

by:wilpitz
ID: 38864054
Yep got it to work!

Application.SendKeys ("%S")
Application.SendKeys ("R")
Application.SendKeys ("D")
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38864268
I'm glad I was able to help.

Marty - MVP 2009 to 2012
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question