program
I have an small program with a bug in the second pass to print a spread
sheet, it does the fisrt time without no problems, but the second time,
doesn't work anymore.
NEED HELP..
Private Sub CommandButton1_Click()
ans = MsgBox("Do you want to print faxes?", vbYesNo)
If ans = vbNo Then
Exit Sub
End If
Dim col As Integer
Dim row As Integer
Dim counter As Integer
Dim I As Integer
col = 2
row = 2
counter = 1
For row = row To 20
If Sheet8.Cells(row, counter) = "" Then
Exit Sub
Else
Sheet1.Cells(3, 7) = Sheet8.Cells(row, counter)
counter = counter + 1
Sheet1.Cells(5, 3) = Sheet8.Cells(row, counter)
counter = counter + 1
Sheet1.Cells(5, 6) = Sheet8.Cells(row, counter)
counter = counter + 1
Sheet1.Cells(5, 9) = Sheet8.Cells(row, counter)
counter = counter + 1
Sheet1.Cells(5, 12) = Sheet8.Cells(row, counter)
counter = counter + 1
counter = 1
Sheet1.PrintOut
Sheet8.Cells(row, 5) = "PRINTED"
For I = I To 300
Next I
I = 0
End If
Next row
End Sub
Private Sub CommandButton2_Click()
Dim row1 As Integer
Dim count As Integer
row1 = 2
count = 1
For row1 = row1 To 30
For count = count To 5
Sheet8.Cells(row1, count) = ""
Next count
count = 1
Next row1
End Sub
|