G
Gary Hillerson
I'm trying to figure out how to get tabbing from field-to-field to work in
userForms I'm creating with VBA in Word 2004 on the Mac. Right now, the only
way to change focus is to click the mouse in another textbox, even tho the
tab key properly generates an Exit event.
As a simple test, I create a simple form with four controls: TextBox1,
TextBox2, TextBox3, and a Cancel button that unloads the form.
I implement the _Enter and _Exit methods of each textbox to display a debug
message, e.g. "TextBox2_Enter"
I type something into TextBox1 and then press the Tab key.
I get an Exit event on TextBox1, and an Enter event on Textbox2, as
expected.
But then, I immediately see TextBox2_Exit, TextBox3_Enter, TextBox3_Exit,
and TextBox1_Enter. The net result is that the same control (TextBox1) ends
up with the focus.
Even manually calling the SetFocus method of one textbox from another's Exit
method doesn't work; the focus always cycles back to the textbox in which I
press the Tab key.
There must be some way to work around this tabbing problem, but I'm not
finding it. Can anyone help?
thanks
Gary
userForms I'm creating with VBA in Word 2004 on the Mac. Right now, the only
way to change focus is to click the mouse in another textbox, even tho the
tab key properly generates an Exit event.
As a simple test, I create a simple form with four controls: TextBox1,
TextBox2, TextBox3, and a Cancel button that unloads the form.
I implement the _Enter and _Exit methods of each textbox to display a debug
message, e.g. "TextBox2_Enter"
I type something into TextBox1 and then press the Tab key.
I get an Exit event on TextBox1, and an Enter event on Textbox2, as
expected.
But then, I immediately see TextBox2_Exit, TextBox3_Enter, TextBox3_Exit,
and TextBox1_Enter. The net result is that the same control (TextBox1) ends
up with the focus.
Even manually calling the SetFocus method of one textbox from another's Exit
method doesn't work; the focus always cycles back to the textbox in which I
press the Tab key.
There must be some way to work around this tabbing problem, but I'm not
finding it. Can anyone help?
thanks
Gary