ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tab Order on Form (https://www.excelbanter.com/excel-programming/356274-tab-order-form.html)

gr

Tab Order on Form
 
I am having some difficulty with this one.

I have a form that has "columns" on it. These are text boxes for 5
different items. The columns a
Qty UOM Description Amount

Initially the QTY is set to 0 on all the rows and the Enabled property
is false on UOM/Desc/Amount. If the user changes the QTY to a non zero
amount, the rest of the column becomes enabled=true. Then I want the
UOM to get the focus. But it doesn't. It goes to the QTY of the next
line. I have the tab stop values setup correctly going left to right
per line. I have played with putting the following code in all the
different events, but to no avail.

------
If Val(txtMisc1Qty.Text) = 0 Then
txtMisc1Desc.Enabled = False
txtMisc1UOM.Enabled = False
txtMisc1OverRide.Enabled = False
txtMisc1AddlProfit.Enabled = False
Else
txtMisc1Desc.Enabled = True
txtMisc1UOM.Enabled = True
txtMisc1OverRide.Enabled = True
txtMisc1AddlProfit.Enabled = True
'txtMisc1UOM.SetFocus
End If
------

I have put it in the following events, and as I can tell, this is the
order that they fire in.
----
'Order
'Enter
'Change
'Before_Update
'After_Update
'Exit

Thanks in advance
Guy



All times are GMT +1. The time now is 10:55 AM.

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