-
Hey folks,
I am new to the VB world; I have a form setup where it has 3 textboxs used to enter values to calculate financial things. I have the same selection of the textboxs on the menu bar. If I select it on the menu bar, it is supposed to prevent me from entering any relevent information in the textbox. I know I have to use If..Then statement in the code box and check feature. How do I go around in the design aspect? Thanxs in advance for the Help :D.
-
Here is some code you can use. You can add the code for the 3rd TextBox and menu item. BTW, my menu items are sub-menus so that they can show check marks that indicate when the associated textbox is enabaled.
Code:
Private Sub mnuTB1_Click()
' Change the Enabled property each time the menu
' item is clicked
Text1.Enabled = Not Text1.Enabled
' Set the Checked property of the menu item to
' Checked in Text1 is enabled, otherwise set it
' to not checked.
mnuTB1.Checked = Text1.Enabled
End Sub
Private Sub mnuTB2_Click()
Text2.Enabled = Not Text2.Enabled
mnuTB2.Checked = Text2.Enabled
End Sub
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"