PDA

View Full Version : Multi Time sheet production



lee2boy
02-05-2010, 03:30 PM
Chaps can anyone of you VBA kings please help me out and take a look at the spreadsheet , it has a small macro and button that is not working , once the button in the tsheet is pushed it is then meant to print a time sheet with a different name from the data sheet, but what is happening instead is that the dat sheet is bing printed and not the time , 34 for times (34 pages in the data sheet)
If anyone could help I would be grateful
Regards,
Lee

Bob Phillips
02-05-2010, 04:50 PM
Sub Macro1()
With Sheets("Data")

.Range("Data").Copy .Range("A501")

Do

.Range("A501..E501").Copy .Range("A499")
Worksheets("TSHEET").PrintOut Copies:=1
.Range("A501").EntireRow.Delete
Loop Until .Range("A501") = ("")
End With
End Sub

lee2boy
02-05-2010, 04:58 PM
Thanks for that pal
what was up with original as it did work but stooped for some reason
Cheers,

Lee

mdmackillop
02-07-2010, 01:51 AM
This line is printing out the active sheet

ActiveWindow.SelectedSheets.PrintOut Copies:=1

XLD's code is specific as to the sheet to print.

Worksheets("TSHEET").PrintOut Copies:=1