-
Solved: Embedded controls
Hi
Am wondering if embedded optionbuttons can be part of a sub dependent on their state.
I have a couple on a sheet and am using the following routine
[VBA]Sub query()
If OptionButton1.Enabled = True And Range("V28").Value < 0 Then
UserForm1.Show
End If
End Sub[/VBA]
But regardless of the value of V28 or optionbutton selected the userform still displays.
Any help appreciated
thanks
-
The .Enabled property shows whether the Option button CAN be clicked. The .Value property returns whether it HAS been clicked.
[VBA]If Range("V28").Value < 0 And OptionButton1.Value Then
UserForm1.Show
End If [/VBA]
-
Thanks Mike,
I think it also needs to be in the sheet code as it doesn't want to work in a stand alone module
regards
Jon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules