LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Printing problem

I have this small macro, that after printing 3pages, just give an error,
I guess it need some time of pause between every page, but I don't know
much about this language, (VBA) can someone help me?

Thanks,

Fernando

CODE

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
Printing problem vrftb New Users to Excel 0 October 19th 08 01:22 AM
Printing problem Dr Fumanchu Excel Discussion (Misc queries) 1 February 27th 08 01:54 PM
Printing Problem Mamaschantz Charts and Charting in Excel 1 September 11th 07 04:33 PM
Printing problem Dudley Excel Discussion (Misc queries) 2 December 20th 05 04:37 PM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"