Solved

Excel Macro, need to use key combination in macro

Posted on 2013-02-06
6
339 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 48

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 48

Expert Comment

by:Martin Liss
ID: 38861878
So Alt, the S then R then D? or Alt+S, Alt+R, Alt+D?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 48

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 48

Expert Comment

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

Marty - MVP 2009 to 2012
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

635 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