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
Solved

Excel Macro, need to use key combination in macro

Posted on 2013-02-06
6
329 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 46

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 46

Expert Comment

by:Martin Liss
ID: 38861878
So Alt, the S then R then D? or Alt+S, Alt+R, Alt+D?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 46

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 46

Expert Comment

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

Marty - MVP 2009 to 2012
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

829 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