Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Cancel return on keyboard

Hi Alvin,
There isn't a built-in event to do that in VBA.

You can create custom events with VBA.
See Event in VBA help.
You would need to raise your event when your conditions are met, or not met.
Then test for the event in the begining of your button code to exit the sub
if the event was (is) raised.

--

John
johnf202 at hotmail dot com



"Alvin Hansen" wrote in message
...
: hi
: I can in a asp/html or whatever
: cancel the effect on the return button
: on the keybord
: So my command button dont work
: with this
: i use
: function cancelEvent() {
: window.event.returnValue=false;
: window.event.cancelBubble=true;
: }
: CAn't i do the same in a userform??
:
: resgards alvin
:


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Cancel return on keyboard

Thank you for your help

Regards alvin


"jaf" skrev:

Hi Alvin,
There isn't a built-in event to do that in VBA.

You can create custom events with VBA.
See Event in VBA help.
You would need to raise your event when your conditions are met, or not met.
Then test for the event in the begining of your button code to exit the sub
if the event was (is) raised.

--

John
johnf202 at hotmail dot com



"Alvin Hansen" wrote in message
...
: hi
: I can in a asp/html or whatever
: cancel the effect on the return button
: on the keybord
: So my command button dont work
: with this
: i use
: function cancelEvent() {
: window.event.returnValue=false;
: window.event.cancelBubble=true;
: }
: CAn't i do the same in a userform??
:
: resgards alvin
:



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
find keyboard short-cut to type symbols on keyboard steamcomputerdriver Excel Discussion (Misc queries) 2 February 6th 10 01:58 PM
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
Return Button on the Keyboard guswine8 Excel Worksheet Functions 3 November 8th 08 04:39 PM
keyboard shortcut to return to previous cell after "find" or "got. Nadavb New Users to Excel 1 May 25th 08 01:39 AM
Return value for Cancel? Jason Hancock Excel Programming 2 May 27th 04 09:59 PM


All times are GMT +1. The time now is 02:57 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"