Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros and Hotkeys
The following code works fine when invoked with alt-f8, etc. But when I
assign a hotkey via the options dialog box and attempt to invoke it using that hotkey, the last line is not executed or does not work. The comment is created, and it is blank, but the user is not taken into the edit mode of the comment. Any ideas? Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros and Hotkeys
Adding a slight delay worked ok for me:
Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If Application.Wait Now + TimeSerial(0, 0, 1) SendKeys "%ie~" Christopher Weaver wrote: The following code works fine when invoked with alt-f8, etc. But when I assign a hotkey via the options dialog box and attempt to invoke it using that hotkey, the last line is not executed or does not work. The comment is created, and it is blank, but the user is not taken into the edit mode of the comment. Any ideas? Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros and Hotkeys
Thank you, that works for me, as well.
"Dave Peterson" wrote in message ... Adding a slight delay worked ok for me: Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If Application.Wait Now + TimeSerial(0, 0, 1) SendKeys "%ie~" Christopher Weaver wrote: The following code works fine when invoked with alt-f8, etc. But when I assign a hotkey via the options dialog box and attempt to invoke it using that hotkey, the last line is not executed or does not work. The comment is created, and it is blank, but the user is not taken into the edit mode of the comment. Any ideas? Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then ActiveCell.AddComment Text:="" End If SendKeys "%ie~" -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Hotkeys... | Excel Discussion (Misc queries) | |||
Extend formula hotkeys? | Excel Discussion (Misc queries) | |||
assigning hotkeys | Excel Discussion (Misc queries) | |||
insert certain terms via hotkeys | New Users to Excel | |||
Disable Hotkeys | Excel Discussion (Misc queries) |