ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   keyboard event in user form (https://www.excelbanter.com/excel-programming/332944-keyboard-event-user-form.html)

gpjb

keyboard event in user form
 

I have a fairly compex userform controlling a hotel reservation system.

I have an annoying problem that occurs when the user presses th
"enter/return" key - all data on the form disappears. Note: Thi
happens before data is saved.

How can I trap the event , not lose the data entered, and continu
entering data on to the form?

Thanks, gpj

--
gpj
-----------------------------------------------------------------------
gpjb's Profile: http://www.excelforum.com/member.php...fo&userid=1408
View this thread: http://www.excelforum.com/showthread.php?threadid=38253


Bob Flanagan

keyboard event in user form
 
Have you set a break point right before you display the form so that you can
walk through the code that is triggered when the user presses enter? It
sounds like one of your macros is clearning the form and you just have to
find out why.

Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"gpjb" wrote in message
...

I have a fairly compex userform controlling a hotel reservation system.

I have an annoying problem that occurs when the user presses the
"enter/return" key - all data on the form disappears. Note: This
happens before data is saved.

How can I trap the event , not lose the data entered, and continue
entering data on to the form?

Thanks, gpjb


--
gpjb
------------------------------------------------------------------------
gpjb's Profile:
http://www.excelforum.com/member.php...o&userid=14081
View this thread: http://www.excelforum.com/showthread...hreadid=382530




Bob Phillips[_7_]

keyboard event in user form
 
Finding the problem has to be better than trying to trap the enter key. Step
through the code and check the point at which the data gets cleared.

--
HTH

Bob Phillips

"gpjb" wrote in message
...

I have a fairly compex userform controlling a hotel reservation system.

I have an annoying problem that occurs when the user presses the
"enter/return" key - all data on the form disappears. Note: This
happens before data is saved.

How can I trap the event , not lose the data entered, and continue
entering data on to the form?

Thanks, gpjb


--
gpjb
------------------------------------------------------------------------
gpjb's Profile:

http://www.excelforum.com/member.php...o&userid=14081
View this thread: http://www.excelforum.com/showthread...hreadid=382530




gpjb[_2_]

keyboard event in user form
 

Thanks for your thoughts.

I set the break so I could identify the sub routine clearing the data.
Once I identified it, a simple instruction in the routine gives user
choice to clear or not. However, something is calling the routine and I
haven't a clue as to why. There is no instruction anywhere, nor is
there any onkey event to call it.

Thanks again - gpjb


--
gpjb
------------------------------------------------------------------------
gpjb's Profile: http://www.excelforum.com/member.php...o&userid=14081
View this thread: http://www.excelforum.com/showthread...hreadid=382530



All times are GMT +1. The time now is 08:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com