+ Reply to Thread
Results 1 to 4 of 4

Multiple Excel Checkboxes

Hybrid View

  1. #1
    Registered User
    Join Date
    11-10-2008
    Location
    Sacramento, CA
    Posts
    3

    Multiple Excel Checkboxes

    I need to create a long series of checkboxes in which each box is linked to the cell directly to the right of it. When I try to copy and past the checkbox, the link doesn't update. Which means I have to go in manually and change every checkbox link.

    Is there any way to expedite this process? Some way to get the cell link to advance automatically? Any help would be appreciated.

    Thanks
    Last edited by VBA Noob; 11-11-2008 at 01:59 PM. Reason: Marked as solved

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    is this from forms or control tool bar ?
    i found this code which will enter multiple forms check boxes linking a1 to b1 up to a1 to a10 on sheet 1 you can change range to suit
    note make sure column is wide enough to fit labels first!! it creates from control tool box so the design mode button has to be clicked to edit/delete
    Sub multcheckbox()
    Dim ws As Worksheet
    Set ws = Sheets("Sheet1")
    Set rng = ws.Range("A1:A10")
    For Each c In rng
    With ws.OLEObjects.Add( _
    ClassType:="Forms.CheckBox.1", _
    Link:=False, _
    DisplayAsIcon:=False, _
    Left:=c.Left, _
    Top:=c.Top, _
    Width:=c.Width, _
    Height:=c.Height)
    .Object.Caption = "martin" 'insert what you want label to be here
    .LinkedCell = c.Offset(0, 1).Address
    .Object.Value = False
    End With
    Next c
    End Sub
    Last edited by martindwilson; 11-10-2008 at 10:00 PM.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You'll be much happier if you use Marlett checkboxes, which are easy to use and, most importantly, on the same layer of the worksheet as all other cells (checkboxes, pictures, autoshapes, ... are not).

    Search here and on the web for many examples of how to implement.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    11-10-2008
    Location
    Sacramento, CA
    Posts
    3
    Great! Thanks for the suggestions. These help quite a bit.

+ 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