J
joseph m
Hi all
This is a query about tabbing in a protected Word Document (v2003), with
disabled controls.
In the word document there are OleControls. Some of these oleControls are
disabled so no text cannot be entered into them.
However whilst tabbing from an enabled field to a disabled field the cursor
gets "stuck", and cannot move from the disabled from by tabbing. The user
needs to use the mouse.
To work around this I have developed vba code to set the order of tabbing
like this.
Control 1 - Name : Customer
Control 1 - Type : textbox
Control 1 - State :enabled
Control 2 - Name : CustomerId
Control 2 - Type : textbox
Control 2 - State :disabled
Control 3 - Name : Address
Control 3 - Type : textbox
Control 3 - State :enabled
I have developed vba code to link a keydown event on the customer field to
the address field, if the key input is a tab key
private sub cusomer_keyDown(byval keyCode as MSforms.ReturnInteger, _
byval shift as integer)
if keyCode = VBA.vbKeyTab then
Address.select
End if
End sub
The problem is, most of the time this works, however on certain computers
with the same version of Word installed as mine, the tabbing does not follow
this order !
It seems to create a random order, and positions the oleControl on a
different textbox, one that was not specified in "tab-linking"
I have come to this discussion group to find if anybody has experienced the
same issue as this, and to look for a fix or a work around to this.
Thanks in advance
Joseph
This is a query about tabbing in a protected Word Document (v2003), with
disabled controls.
In the word document there are OleControls. Some of these oleControls are
disabled so no text cannot be entered into them.
However whilst tabbing from an enabled field to a disabled field the cursor
gets "stuck", and cannot move from the disabled from by tabbing. The user
needs to use the mouse.
To work around this I have developed vba code to set the order of tabbing
like this.
Control 1 - Name : Customer
Control 1 - Type : textbox
Control 1 - State :enabled
Control 2 - Name : CustomerId
Control 2 - Type : textbox
Control 2 - State :disabled
Control 3 - Name : Address
Control 3 - Type : textbox
Control 3 - State :enabled
I have developed vba code to link a keydown event on the customer field to
the address field, if the key input is a tab key
private sub cusomer_keyDown(byval keyCode as MSforms.ReturnInteger, _
byval shift as integer)
if keyCode = VBA.vbKeyTab then
Address.select
End if
End sub
The problem is, most of the time this works, however on certain computers
with the same version of Word installed as mine, the tabbing does not follow
this order !
It seems to create a random order, and positions the oleControl on a
different textbox, one that was not specified in "tab-linking"
I have come to this discussion group to find if anybody has experienced the
same issue as this, and to look for a fix or a work around to this.
Thanks in advance
Joseph