olatzcelaya
Programmer
Hi all,
I am writing a code in Visual Basic to do a program in excel and i want to disabled a button regarding a condition. I have written the following code but it gives me an error in : Button3.Enabled = True. It is like the program is trying to tell me that it is not the correct definition. Could anybody help me in this matter??Any help will be very appreciated.
Private Sub ComboBox5_Click()
Dim e As Integer
If ComboBox5.Text = "YES" Then
e = 0
' The customer decides the type of pallet to use
Button3.Enabled = True
ElseIf ComboBox5.Text = "NO" Then
e = 1
' We decide the type of pallet to use. The cells of pallet width and pallet length are disabled
Button3.Enabled = False
End If
End Sub
THANK YOU ;-),
Olatz
I am writing a code in Visual Basic to do a program in excel and i want to disabled a button regarding a condition. I have written the following code but it gives me an error in : Button3.Enabled = True. It is like the program is trying to tell me that it is not the correct definition. Could anybody help me in this matter??Any help will be very appreciated.
Private Sub ComboBox5_Click()
Dim e As Integer
If ComboBox5.Text = "YES" Then
e = 0
' The customer decides the type of pallet to use
Button3.Enabled = True
ElseIf ComboBox5.Text = "NO" Then
e = 1
' We decide the type of pallet to use. The cells of pallet width and pallet length are disabled
Button3.Enabled = False
End If
End Sub
THANK YOU ;-),
Olatz