+ Reply to Thread
Results 1 to 8 of 8

Need help with radio button enable using 2 different type of radio button

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Question Need help with radio button enable using 2 different type of radio button

    Currently we have

    Form controls

    ActiveX Controls

    I am using this two different of controls to do my radio button

    in my Form control i have create 3 radio button
    In my activex control i ahve create another 2 radio button

    in my form control if i select my first radio button i want it to disabled my activeX control but however i realize there some restriction can someone help me

    First radio - Disable Active X Radio button
    2nd radio - Enabled Active X Radio button
    3rd Radio - Enabled Active X Radio button

    ActiveX controls

    Another radio button for it
    Attached Files Attached Files
    Last edited by excelvbanew; 05-29-2023 at 03:16 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Need help with radio button enable using 2 different type of radio button

    Assign this macro to the 3 form controls

    code stored in a code module
    Sub DisableOptionButtons()
    
        With ActiveSheet
            Select Case UCase(Application.Caller)
            Case "OPTION BUTTON 2"
                ' disable
                .Shapes("OptionButton1").OLEFormat.Object.Enabled = False
                .Shapes("OptionButton2").OLEFormat.Object.Enabled = False
            Case Else
                ' enable
                .Shapes("OptionButton1").OLEFormat.Object.Enabled = True
                .Shapes("OptionButton2").OLEFormat.Object.Enabled = True
            End Select
        End With
    End Sub
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Need help with radio button enable using 2 different type of radio button

    Hi i try yr marco however i am getting
    run time error 1004
    unabled to set the enabled property of the rectangle class

  4. #4
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Need help with radio button enable using 2 different type of radio button

    Nice this work i think i didnt read carefully

    Thanks i mark this as solve

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Need help with radio button enable using 2 different type of radio button

    Do you get that error in the example workbook I posted or in your workbook?

    If it's you workbook attach it so we can debug your code.

  6. #6
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Need help with radio button enable using 2 different type of radio button

    sure i have try your code in my example but i am getting let me reattached
    Attached Files Attached Files
    Last edited by excelvbanew; 05-29-2023 at 06:41 AM.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Need help with radio button enable using 2 different type of radio button

    Your workbook has hidden labels with the same name as the option buttons.

    Rename the label controls to something else

  8. #8
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Need help with radio button enable using 2 different type of radio button

    Okay prolly give me like 1 hours I take a look again

    Cos I believe I use your excel file but couldn't get it to work

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to have a User Form Radio Button that is controlled by a radio button on Worksheet
    By cameronadill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2022, 01:22 PM
  2. [SOLVED] How to connect User Form Radio Button to Radio Buttons in Workbook
    By cameronadill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2022, 07:43 AM
  3. Replies: 5
    Last Post: 10-27-2016, 06:39 PM
  4. Pressing one radio button to select another radio button
    By raehippychick in forum Excel General
    Replies: 1
    Last Post: 09-13-2007, 11:30 PM
  5. Can the Combo Box move and size with cells radio button be enable
    By Tom Cote in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 09:05 PM
  6. Can the Combo Box move and size with cells radio button be enable
    By Tom Cote in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 05:05 AM
  7. [SOLVED] Can the Combo Box move and size with cells radio button be enable
    By Tom Cote in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1