Results 1 to 4 of 4

Thread: Generating a checkbox corresponding to the each worksheet on click

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    I have changed the code, it now creates the checkboxes successfully, just it doesn't put them in correct place:
    Private Sub Update_Click()
    Dim rng As Range
    Dim LowestCheck As CheckBox
    Dim cb As CheckBox
    Dim Exists As Boolean
    
    
    
    
        For Each ws In ActiveWorkbook.Worksheets
            For Each cb In ThisWorkbook.Worksheets("Summary").CheckBoxes
                If cb.Name = ws.Name Then
                    Exists = True
                
                End If
                
            Next
            
                          
            If Exists = False Then
                With ThisWorkbook.Worksheets("Summary").CheckBoxes.Add(Selection.Left, Selection.Top, Selection.Width, Selection.Height)
                    .Name = ws.Name
                    .Caption = ws.Name
                End With
                
            End If
        Next
    End Sub
    All the current checkboxes are within Column H, I just need a way to determine what is the lowest cell within that column that has a checkbox in and then from there, add a checkbox to the cell below. Again, any help would be appreciated
    Last edited by georgedixon; 09-04-2018 at 05:54 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •