Ok so what I'm aiming for here is a form, Which has essentially 3 buttons on top.
One of these buttons adds a new Row to the form (the row contains all the elements of the previous row and includes a checkbox automatically in the leftmost cell.
This I have working with the following macro attached to one of the buttons:
Sub testme()
Rows("25:25").Select
Selection.Insert Shift:=xlDown
Dim myCBX As CheckBox
Dim myCell As Range
With ActiveSheet
'.CheckBoxes.Delete 'nice for testing
For Each myCell In ActiveSheet.Range("A25:A25").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width - 35, _
Left:=.Left + 33, Height:=.Height)
With myCBX
.LinkedCell = myCell.Address(external:=True)
.Caption = ""
.Name = "CBX_" & myCell.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With
End Sub
The part on which I'm stuck is the next button.. Which should hide any row which contains a Check Box that is not currently clicked, and then send the form to the printer. Is there a better way to implement this, and have it be automated as the macro above was?
Sub Macro1()
'
If Cells(23, A).Value = "TRUE" ThenRows("23:23").EntireRow.Hidden = False Else If Cells(23, A).Value = "FALSE" Rows("23:23").EntireRow.Hidden = True
Bookmarks