Davy:
"Davy" <an*******@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
Hi!
Can somebody help me to print a specific worksheet of an Excel file thru
Visual Basic?
Thanks
Davy
Try this:
Sub PrintSpecificSheet(ByVal i As Integer)
Sheets(i).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate _
:=True
End Sub
Where i is the Index of the sheet you want to print. you can overload this
to accept a String which could be the WorkSheet name, or you could just
change it to a string...
HTH,
Bill