Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simulating Key Presses in Macros
Hi,
How do I simulate pressing the keys using a macro in Excel. For example, if I want to simulate pressing the keys Alt+H+A, what should I do in the macro? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simulating Key Presses in Macros
Try something like:
Private Sub CommandButton1_Click() Application.SendKeys ("%ha") End Sub If you execute from the vb editor, you get the About box for Visual Basic, but this brings up about for Excel. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simulating Key Presses in Macros
If it is the About dialog you want to invoke then Code ------------------- Sub About() Application.CommandBars.FindControl(ID:=927).Execu te End Sub ------------------- -- Ivan F Moal ----------------------------------------------------------------------- Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195 View this thread: http://www.excelforum.com/showthread.php?threadid=52511 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simulating Key Presses in Macros
Ivan! Sweet! Where do you look for the ID numbers?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simulating a Zodiac with a chart | Charts and Charting in Excel | |||
simulating click events | Excel Programming | |||
New offering: Class to handle multi key presses in sorted list | Excel Programming | |||
how to Pause a VBA procedure until user presses Enter | Excel Programming | |||
Simulating a synchronous process | Excel Programming |