ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2000 Text Box Issue (https://www.excelbanter.com/excel-programming/345860-excel-2000-text-box-issue.html)

Cory

Excel 2000 Text Box Issue
 
I am currently working with a VBA UserForm with several text boxes on
it. I am experiencing an intermittant problem with a couple of them.

On occaision, when the user attempts to use the tab key to move to the
next control, the tab key is recognized in the control as a character
rather than moving to the next control. Is this a quirk of Excel? I
can find plenty of sources to allow this kind of behavior but have not
found anything to prevent it.

I am only using the BeforeUpdate and Exit events. In the BeforeUpdate
event I am checking for a numeric value and the exit event I am
formating the entry to currency.

Since I'm testing for a numeric value and the tab character is not
recognized as a number, my BeforeUpdate works as it should but the user
loses all the information that they entered.

The user can still move out of the text box with the mouse, but this
can be a bit of an annoyance.

Thanks for any help you can provide. Let me know if you need any
further information.

Cory Bremer


JNW

Excel 2000 Text Box Issue
 
I've had similar issues, and it is always periodic. You can use the
TabKeyBehavior property and set it to false. But it may be a quirk in 2000

"Cory" wrote:

I am currently working with a VBA UserForm with several text boxes on
it. I am experiencing an intermittant problem with a couple of them.

On occaision, when the user attempts to use the tab key to move to the
next control, the tab key is recognized in the control as a character
rather than moving to the next control. Is this a quirk of Excel? I
can find plenty of sources to allow this kind of behavior but have not
found anything to prevent it.

I am only using the BeforeUpdate and Exit events. In the BeforeUpdate
event I am checking for a numeric value and the exit event I am
formating the entry to currency.

Since I'm testing for a numeric value and the tab character is not
recognized as a number, my BeforeUpdate works as it should but the user
loses all the information that they entered.

The user can still move out of the text box with the mouse, but this
can be a bit of an annoyance.

Thanks for any help you can provide. Let me know if you need any
further information.

Cory Bremer



K Dales[_2_]

Excel 2000 Text Box Issue
 
Textboxes have a property TabKeyBehavior that determines this; from the Help
file:

True Pressing TAB inserts a tab character in the edit region.
False Pressing TAB moves the focus to the next object in the tab order
(default).


Remarks

The TabKeyBehavior and MultiLine properties are closely related. The values
described above only apply if MultiLine is True. If MultiLine is False,
pressing TAB always moves the focus to the next control in the tab order
regardless of the value of TabKeyBehavior.

--
- K Dales


"Cory" wrote:

I am currently working with a VBA UserForm with several text boxes on
it. I am experiencing an intermittant problem with a couple of them.

On occaision, when the user attempts to use the tab key to move to the
next control, the tab key is recognized in the control as a character
rather than moving to the next control. Is this a quirk of Excel? I
can find plenty of sources to allow this kind of behavior but have not
found anything to prevent it.

I am only using the BeforeUpdate and Exit events. In the BeforeUpdate
event I am checking for a numeric value and the exit event I am
formating the entry to currency.

Since I'm testing for a numeric value and the tab character is not
recognized as a number, my BeforeUpdate works as it should but the user
loses all the information that they entered.

The user can still move out of the text box with the mouse, but this
can be a bit of an annoyance.

Thanks for any help you can provide. Let me know if you need any
further information.

Cory Bremer



Tom Ogilvy

Excel 2000 Text Box Issue
 
have you looked at the TabKeyBehavior Property of each of the text boxes?

True Pressing TAB inserts a tab character in the edit region.
False Pressing TAB moves the focus to the next object in the tab order
(default).


--
Regards,
Tom Ogilvy


"Cory" wrote in message
oups.com...
I am currently working with a VBA UserForm with several text boxes on
it. I am experiencing an intermittant problem with a couple of them.

On occaision, when the user attempts to use the tab key to move to the
next control, the tab key is recognized in the control as a character
rather than moving to the next control. Is this a quirk of Excel? I
can find plenty of sources to allow this kind of behavior but have not
found anything to prevent it.

I am only using the BeforeUpdate and Exit events. In the BeforeUpdate
event I am checking for a numeric value and the exit event I am
formating the entry to currency.

Since I'm testing for a numeric value and the tab character is not
recognized as a number, my BeforeUpdate works as it should but the user
loses all the information that they entered.

The user can still move out of the text box with the mouse, but this
can be a bit of an annoyance.

Thanks for any help you can provide. Let me know if you need any
further information.

Cory Bremer




Cory

Excel 2000 Text Box Issue
 
Thanks for the help, I'll try it out.


Cory

Excel 2000 Text Box Issue
 
Thanks again for all of your help, but I've gone and checked all of my
text boxes. They all have their MultiLine and TabKeyBehavior
properties set to false. Any other ideas?


Tom Ogilvy

Excel 2000 Text Box Issue
 
I have never run into that as a problem. So I would say your experience is
atypical and possibly the result of something in your code or some other
property. But nothing leaps to mind for me. Assuming you arenot setting
Cancel to true in the Exit event and aren't using SetFocus or related.
Perhaps changing your event to afterupdate instead of beforeupdate.



--
Regards,
Tom Ogilvy

"Cory" wrote in message
oups.com...
Thanks again for all of your help, but I've gone and checked all of my
text boxes. They all have their MultiLine and TabKeyBehavior
properties set to false. Any other ideas?





All times are GMT +1. The time now is 10:56 PM.

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