G
Guest
Why do I get an error message on "Option Explicit"?
Private Sub CommandButton34_Click()
Option Explicit
Sub testme01()
Dim iRow As Long
Dim HowMany As Long
HowMany = 20
With ActiveSheet
For iRow = 52 To (32 * HowMany - 1) + 52 Step 32
If IsNumeric(.Cells(iRow + 3, "I").Value) Then
If .Cells(iRow + 3, "I").Value > 0 Then
.Cells(iRow, "A").Resize(16, 9).PrintPreview
'.printout when you're done checking
Exit For
End If
End If
Next iRow
End With
Range("A1").Select
End Sub
Thank You,
Private Sub CommandButton34_Click()
Option Explicit
Sub testme01()
Dim iRow As Long
Dim HowMany As Long
HowMany = 20
With ActiveSheet
For iRow = 52 To (32 * HowMany - 1) + 52 Step 32
If IsNumeric(.Cells(iRow + 3, "I").Value) Then
If .Cells(iRow + 3, "I").Value > 0 Then
.Cells(iRow, "A").Resize(16, 9).PrintPreview
'.printout when you're done checking
Exit For
End If
End If
Next iRow
End With
Range("A1").Select
End Sub
Thank You,