InputBox / VBA question ok = print, cancel = exit
If HTH = happy to help then thank you very much, Bob! It appears to work as
desired now. Not sure what's up with my e-mail address. I registered with my
gmail account.
"Bob Phillips" wrote:
Dim Response As String
Sub printinvoice()
Sheets("C").Select
Response = Application.InputBox( _
prompt:="Enter Invoice Number", _
Type:=2, Default:="", _
Title:="Print Invoice")
If Trim(Response) = "False" Or Empty Then
Range("H14").Value = " "
Exit Sub
Else
Range("H14").Value = Response
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("A").Select
End If
End Sub
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
|