+ Reply to Thread
Results 1 to 7 of 7

Using Loop on CheckBox

  1. #1
    Registered User
    Join Date
    07-04-2012
    Location
    Penang,Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Using Loop on CheckBox

    Please Login or Register  to view this content.
    With the code above, I manage to assign value to cell in sheet "database" according to the condition of the checkbox. However, if there is 30 checkbox, I would like to introduce looping as typing all these line by line would be very time consuming. I think this is possible as there is a pattern.

    Hopefully somebody would enlighten me. Thanks

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Using Loop on CheckBox

    Hi

    Where are the checkboxes? On a form, or directly on the sheet?

    rylo

  3. #3
    Registered User
    Join Date
    07-04-2012
    Location
    Penang,Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Using Loop on CheckBox

    It's directly on the sheet

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Using Loop on CheckBox

    Hi

    Why not use the linked cell property to put the result directly where it has to go?

    rylo

  5. #5
    Registered User
    Join Date
    07-04-2012
    Location
    Penang,Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Using Loop on CheckBox

    The thing is the link cell is in another worksheet and the cell is not specific as it depends on the number of time the loop is done.

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Using Loop on CheckBox

    Hi

    You could put a macro in the general module like
    Please Login or Register  to view this content.
    then the macro for each combobox would be like

    Please Login or Register  to view this content.
    Note that as there is nothing going into column A of the output sheet, if the same checkbox is called multiple times, the it will continue to overwrite the output.

    If you want to loop through all the comboboxes on the sheet, then that could be done, but you would need some way to trigger the macro. How would that be done?

    rylo

  7. #7
    Registered User
    Join Date
    07-04-2012
    Location
    Penang,Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Using Loop on CheckBox

    Yeap, I am also wondering about this for a long time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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