+ Reply to Thread
Results 1 to 3 of 3

Checkbox Range in a For Next Loop

  1. #1
    Registered User
    Join Date
    10-03-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2010
    Posts
    13

    Checkbox Range in a For Next Loop

    Anybody know how to turn this into a For-Next Loop?
    Both the CheckBox & Range need to increment by 1

    CheckBox168.Top = Range("g185").Top
    CheckBox169.Top = Range("g186").Top
    CheckBox170.Top = Range("g187").Top
    CheckBox171.Top = Range("g188").Top
    CheckBox172.Top = Range("g189").Top
    CheckBox173.Top = Range("g190").Top
    CheckBox174.Top = Range("g191").Top
    CheckBox175.Top = Range("g192").Top
    CheckBox176.Top = Range("g193").Top
    CheckBox177.Top = Range("g194").Top
    CheckBox178.Top = Range("g195").Top
    CheckBox179.Top = Range("g196").Top
    CheckBox180.Top = Range("g197").Top
    CheckBox181.Top = Range("g198").Top

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Checkbox Range in a For Next Loop

    assuming you used ActiveX checkboxes, you can try this macro
    Please Login or Register  to view this content.
    and this one will work for Form control checkboxes:
    Please Login or Register  to view this content.
    Last edited by p24leclerc; 11-28-2014 at 09:08 PM.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-03-2014
    Location
    Phoenix, Arizona
    MS-Off Ver
    2010
    Posts
    13

    Re: Checkbox Range in a For Next Loop

    Outstanding!!!

    This worked, thank you so much p24leclerc

+ 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. Label checkbox loop
    By Pavpav in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-25-2014, 09:30 AM
  2. Do Loop with-in checkbox
    By DevfromCorrie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2014, 01:02 PM
  3. Using Loop on CheckBox
    By Jimmyzai in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-06-2012, 01:37 AM
  4. Checkbox generator with a loop
    By Jwalker in forum Excel General
    Replies: 1
    Last Post: 08-26-2006, 04:49 AM
  5. Refer checkbox by name in a loop
    By Xtender in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-24-2006, 07:50 AM

Tags for this Thread

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