Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Hotkeys... Connor Excel Discussion (Misc queries) 6 March 2nd 09 09:29 PM
Extend formula hotkeys? Joe M. Excel Discussion (Misc queries) 4 June 3rd 08 07:15 PM
assigning hotkeys tbird79 Excel Discussion (Misc queries) 2 December 21st 06 04:16 PM
insert certain terms via hotkeys texter New Users to Excel 3 March 10th 06 04:23 PM
Disable Hotkeys freekrill Excel Discussion (Misc queries) 1 November 24th 05 03:39 PM


All times are GMT +1. The time now is 03:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"