Thread
:
Complex User Input Box
View Single Post
#
1
Posted to microsoft.public.excel.programming
Leith Ross[_361_]
external usenet poster
Posts: 1
Complex User Input Box
Hello Andy,
Here is an example using both Message Boxes and Input Boxes in a macro
I wasn't quite sure want you were after for the Printer example, so
substituted an example of calling the Printer Dialog within Excel. Th
individual parts could be used as needed in your code when you need
response from the user. If you have any questions you can contact m
via private message here at the forum or email me
EXAMPLE
Code
-------------------
Sub QueryTest()
Dim Email
Dim Fax
Dim RetVal
RetVal = MsgBox("Do you wish to send an Email?", vbQuestion + vbYesNo)
If RetVal = vbYes Then
Email = InputBox("Please Enter the Email address below.")
End If
RetVal = MsgBox("Do you want to send a Fax?", vbQuestion + vbYesNo)
If RetVal = vbYes Then
Fax = InputBox("Please enter the Fax number below.")
End If
RetVal = MsgBox("Do you want a Printout?", vbQuestion + vbYesNo)
If RetVal = vbYes Then
Excel.Application.Dialogs(xlDialogPrint).Show
End If
End Sub
-------------------
Sincerely,
Leith Ros
--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...fo&userid=1846
View this thread:
http://www.excelforum.com/showthread.php?threadid=49235
Reply With Quote
Leith Ross[_361_]
View Public Profile
Find all posts by Leith Ross[_361_]