Solved

Excel Macro, need to use key combination in macro

Posted on 2013-02-06
6
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

Industry Leaders: 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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
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!
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

738 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