+ Reply to Thread
Results 1 to 5 of 5

Adding change event to dynamically created option buttons on userform

  1. #1
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Adding change event to dynamically created option buttons on userform

    Good morning forum

    I have a userform that is populated dynamically based on variable data downloaded from a database. I want to add a change event to the option buttons, to modify the total quantity. The total quantity would increase by the quantity listed every time that "Shipped" was selected, or be reduced when "Not shipped" is clicked. Any suggestions on how to get the change event for the option buttons into this dynamic form? I'm attaching a spreadsheet, with some macro lines disabled to prevent errors in testing, and stop database access.

    Thanks for reading
    Attached Files Attached Files
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Adding change event to dynamically created option buttons on userform

    Why not use a listbox?

    It can be populated dynamically and can be set to display option/check buttons for each item.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Adding change event to dynamically created option buttons on userform

    Norie, I can look at that, but will that help my problem of updating the total quantity based on actions for a given line? Sorry if it is a dumb question, learning lots, but in some areas I definitely need work...

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Adding change event to dynamically created option buttons on userform

    Have a look at the attached file.
    Attached Files Attached Files

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Adding change event to dynamically created option buttons on userform

    Norie, I haven't really used a listbox before, great suggestion I'll modify a bit as there will never be a shipped "true" condition being listed, that field is left over from earlier revs, but only "FALSE" items get downloaded into the sheet.
    Anyhow, thanks for the quick response, seems I overcomplicated my original approach.
    You rock!

+ 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. Need help to get code created Userform textboxes to fire a change event
    By brusk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2013, 12:06 AM
  2. [SOLVED] Option Buttons to Change ComboBox Values Dynamically
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2012, 11:48 PM
  3. Click event of dynamically created label
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-03-2010, 10:09 AM
  4. How to change the Caption of Radio/Option Buttons Dynamically?
    By e4excel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-29-2009, 05:40 PM
  5. Back color of dynamically-created buttons
    By simon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2005, 07:06 AM

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