Problem while printing a sheet
Hi,
I have Statement workbook with Statement sheet, for bank statements.
For every customer read from the Master sheet in the Main Workbook, I
am opening the statement sheet and adding all the relevant lines
(rows). As per the data I have, the maximum no. of pages a customer's
statement can have is 3. So I have set the print area to 3 pages.
I have coded the following:
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveWorkbook.SaveAs Filename:="Statement For " & Master.UniqueID & "
" & Date
ActiveWindow.Close
Everytime 3 pages are printed even if details are of 1 page. Also the
second line of code (To Save) is not working. I want to save the
statement, for this customer, for future reference but with a
different name as I have to open the Statement sheet again for the
next customer. The statement sheet has company logo and some other
stuff in it.
I hope I have explained the problem properly. Can someone help me.
Thanks in advance
|