ExcelNovice
Well-known Member
- Joined
- May 12, 2002
- Messages
- 583
I'm attempting to disable the OK (Unload Me) button a userform with the macro shown below. The macro works (well in a way it does), except that I keep getting the following error message each time:
Run time error 438.
Object doesn't support this property or method.
When I click the Debug button, the following line on the macro is highlighted:
Unload Me.Hide
Can someone provide some guidance please?
The macro is below:
Private Sub CommandButton1_Click()
If Range("x29").Value * Range("i29").Value < 90 Then
Unload Me.Hide
If Range("x29").Value * Range("i29").Value > 90 Then
Unload Me
End If
End If
End Sub
Run time error 438.
Object doesn't support this property or method.
When I click the Debug button, the following line on the macro is highlighted:
Unload Me.Hide
Can someone provide some guidance please?
The macro is below:
Private Sub CommandButton1_Click()
If Range("x29").Value * Range("i29").Value < 90 Then
Unload Me.Hide
If Range("x29").Value * Range("i29").Value > 90 Then
Unload Me
End If
End If
End Sub