Article ID: 192364
Article Last Modified on 6/17/2005
Sub Print_Area()
Dim My_Range As String
On Error Resume Next 'enables error handling
My_Range = InputBox("Enter the name of the area to print:")
'if Cancel is chosen then InputBox returns empty string
If Len(My_Range) > 0 Then Range(My_Range).PrintOut
If Err > 0 Then MsgBox "Name or range specified is not valid."
End Sub
Additional query words: XL98
Keywords: kbhowto kbdtacode KB192364