Input box
Here is something you can use.
Sub PrintWS()
Dim ws As Worksheet
Dim sName$
On Error GoTo ErrorInPrintWS
sName = InputBox("Enter worksheet name", "Print")
If sName < "" Then
Set ws = Worksheets(sName)
ws.PrintOut
End If
Exit Sub
ErrorInPrintWS:
Exit Sub
End Sub
"TimMalone" wrote:
Would someone be so kind as to help me with the following question?
I would like to include a macro in a workbook that, upon running, displays
an input box for the user to input a worksheet name (e.g. Sheet1) which in
turn would be selected, print range set and ultimately printed.
Sincere thanks to any and all who are so gracious to offer their help with
these matters.
Regards,
Tim Malone
|