+ Reply to Thread
Results 1 to 4 of 4

How to Select Radio Button w/ VBA for Macro inside Macro on Form Control w/ Potential Loop

  1. #1
    Registered User
    Join Date
    01-06-2015
    Location
    Miami
    MS-Off Ver
    2010
    Posts
    2

    How to Select Radio Button w/ VBA for Macro inside Macro on Form Control w/ Potential Loop

    Hi Community,

    I am working on a project where I currently have an existing Form Control that pops up in the Excel Worksheet. Different radio buttons can be selected. After selected, I can choose to click "Run Report" where the macro will based on the radio button selections, generate the appropriate report from data stored in Excel.

    My challenge:
    What I would like to do is to create a separate Macro, that will initialize this macro, and then click on the desired radio buttons (both in groups or independently), and then to run the macro to produce the report.

    After, I would like the macro to re-open the Form Control, and select different radio buttons to produce other reports.

    The goal will be to potentially create this as a loop, or more simply one at a time, with in-between saving these reports to a separate excel file.

    At the end of the macro, I would have a new excel file with all the reports in one workbook.

    Where I am currently having a challenge is how to have the macro auto-select the radio buttons I would like to use and to run the report.

    Happy to provide further insights, as I explore the code methodology to complete.

    Thank you!

    Kind Regards,
    David

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: How to Select Radio Button w/ VBA for Macro inside Macro on Form Control w/ Potential

    Quote Originally Posted by dyako;3947509I
    currently have an existing Form Control
    Userform?

    After, I would like the macro to re-open the Form Control, and select different radio buttons to produce other reports...as a loop, saving ese reports to a separate excel file. ...I would have a new excel file with all the reports in one workbook.
    Ok, here you say a seperate file, but in following sentence, you say in one workbook. Which is it, or both?

    ...challenge is how to have the macro auto-select the radio buttons
    If you have a userform, I would just add another command button that iterates all the option buttons to create reports.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    01-06-2015
    Location
    Miami
    MS-Off Ver
    2010
    Posts
    2

    Re: How to Select Radio Button w/ VBA for Macro inside Macro on Form Control w/ Potential

    Thanks for your reply Tinbendr.

    For clarity this is a UserForm that pops up in Excel through the Ribbon.

    I would like to take all these worksheets, and then save them in a new workbook as Paste Special Values only, to reduce the file size and improve the file loading time.

    This sounds like a good idea, to add another command button that iterates all the option buttons to create reports. However, I am not familiar how to do this. Would you have any recommendations?

    Thank you Tinbendr.

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: How to Select Radio Button w/ VBA for Macro inside Macro on Form Control w/ Potential

    With out a sample, it's difficult to offer specific advice, but for instance
    Please Login or Register  to view this content.
    Will iterate all the controls and take action on only optionbuttons. If you need to loop through mutiple ob's from group one, put the same code inside the Case statements for each one.

+ 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] Using macro to create a Form Control Button and Assign macro to it in a specified Cell
    By weige1989 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2014, 11:51 AM
  2. Creating a macro and form control button
    By kaye.roberts393 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 02:13 PM
  3. Macro-Button (form Control)
    By mjali001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-16-2013, 09:52 PM
  4. Macro to select/tick certain ActiveX OptionButton (radio button)
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2011, 08:40 AM
  5. Replies: 1
    Last Post: 03-15-2011, 04:59 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