Private Sub CommandButton3_Click()
Dim myrange As String
Dim lr As Long
Dim oneDriveFolder As String
Dim obCB As OLEObject, i As Integer
With ActiveSheet
lr = .Range("A" & .Rows.Count).End(xlUp).Row
.Range("T" & lr).Value = " "
End With
For i = 3 To 50
Set obCB = ThisWorkbook.ActiveSheet.OLEObjects("CheckBox" & i)
With ActiveSheet
If Cells(i, 3).Value = 0 Then
obCB.Object = True
End If
End With
If obCB.Object.Value = False Then
With ActiveSheet.PageSetup
.Zoom = 125
.LeftMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(4)
.Orientation = xlPortrait
Range(Cells(i, 2), Cells(i, 3)).PrintOut
End With
End If
Next i
End Sub
[Code/]