Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enable or Disable Button

Status
Not open for further replies.

NaWin55

Mechanical
Joined
Mar 21, 2020
Messages
98
Location
IN
HI
i have to create this user form based on some conditions
i want the create button to enabled only if the
user Select Surface and select line and UDU or LDU is chosen and checkbox is checked

here is the userform
userform_biugwk.png


the CREATE button must be frozen until user selects and checks necessary data

i tried with some IF ELSE conditions like
if checkbox.enabled = true then
create.enabled = true​
else
create.enabled = false​
End if

but didnt work
how to write script for the
VBScript
 
Hej

Put it under CheckBox1

Code:
Private Sub CheckBox1_Click()
    If CheckBox1.Value = True Then
        CommandButton1.Enabled = False
    ElseIf CheckBox1.Value = False Then
        CommandButton1.Enabled = True
    End If
End Sub

Regards
Santa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top