LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Why does this code not work?

Attempting to make the regular enter key behave as if you press Alt-Enter, in
responce to someones post about how to do this.

Pressing the standard enter key (not the numeric keypad enter) causes an
infinite loop. The screen flickers with an hour-glass after pressing enter.
Ctrl-Break stops the code and it is always on the Sub AltEnterRtn() line.

Can anyone explain what is going on behind the scenes that causes this?

Sub SetKey()
Application.OnKey "~", "AltEnterRtn"
End Sub
Sub ResetKey()
Application.OnKey "~"
End Sub
Sub AltEnterRtn()
Application.SendKeys "%~", True
End Sub
--
Regards,
John
 
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
Why doesn't ths VBA Code work? Mac Lingo[_2_] Excel Programming 1 November 24th 05 02:03 AM
How can I get this code to work? Sam Excel Programming 1 February 2nd 05 12:24 AM
Why my code do not work : - ( keepitcool Excel Programming 5 September 5th 03 06:28 PM
Why my code do not work : - ( Tom Ogilvy Excel Programming 1 August 31st 03 04:53 PM
Why my code do not work : - ( Bob Phillips[_5_] Excel Programming 0 August 31st 03 01:27 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"