sindrefm
01-23-2015, 02:44 AM
Hi,
I want a function where I can add the name of the Checkbox(ex. CheckBox1, CheckBox2 etc.) and execute code if that Checkbox is False.
I have tried the following code, but it wont work. Anyone knows that is wrong here?
Thanks.
Function Checkbox(x As String) As Boolean
UserForm1.x.Value = False
End Function
If Checkbox(Checkbox1) Then
.......
End If
I want a function where I can add the name of the Checkbox(ex. CheckBox1, CheckBox2 etc.) and execute code if that Checkbox is False.
I have tried the following code, but it wont work. Anyone knows that is wrong here?
Thanks.
Function Checkbox(x As String) As Boolean
UserForm1.x.Value = False
End Function
If Checkbox(Checkbox1) Then
.......
End If