|
-
Jan 8th, 2015, 03:21 PM
#1
Thread Starter
Junior Member
-
Jan 8th, 2015, 03:29 PM
#2
Re: Disable Command Button when Radio Button Enabled
First thing. Once the radio button is clicked, it cannot be unclicked by the user. Wouldn't that be an issue? Maybe a checkbox would be better?
In either case. Within that control's click event
Code:
If Option1.Value = True Then ' or if a checkbox: If Check1.Value = vbChecked Then
CB2.Enabled = False
Text2.Text = Text1.Text
End If
-
Jan 8th, 2015, 03:37 PM
#3
Re: Disable Command Button when Radio Button Enabled
 Originally Posted by LaVolpe
Wouldn't that be an issue? Maybe a checkbox would be better?
OR, as an alternative, place TWO option buttons on the form, then you COULD uncheck one or the other.
-
Jan 8th, 2015, 03:42 PM
#4
Re: Disable Command Button when Radio Button Enabled
 Originally Posted by SamOscarBrown
OR, as an alternative, place TWO option buttons on the form, then you COULD uncheck one or the other.
Or, simply toggle the option button back to False just before the click event exits. But in either case, disabling the 2nd command button doesn't make sense unless the action is meant to be 1-time only
-
Jan 8th, 2015, 05:56 PM
#5
Thread Starter
Junior Member
Re: Disable Command Button when Radio Button Enabled
LaVolpe,
I am not a VB expert. I am trying to add this to an existing macro.
It's running on VBA 7 environment.
I tried the above code and it doesn't work
Can I move this to VB.net?
-
Jan 8th, 2015, 06:56 PM
#6
Re: Disable Command Button when Radio Button Enabled
 Originally Posted by wire-brush
LaVolpe,
I am not a VB expert. I am trying to add this to an existing macro.
It's running on VBA 7 environment.
I tried the above code and it doesn't work
Can I move this to VB.net?
If you would've mentioned VBA, we could've advise you to post it in the Office portion of the forum. I'll inform a moderator so they can move this for you.
-
Jan 9th, 2015, 04:02 AM
#7
Re: Disable Command Button when Radio Button Enabled
Thread moved from the 'VB6' forum to the 'Office Development/VBA' forum (while VBA and VB6 have some similarities, they are not the same thing)
(thanks for letting us know LaVolpe )
Tags for this Thread
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
|
Click Here to Expand Forum to Full Width
|