Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Guys Here is my code 4 a print box (how many copies would you like) Private Sub CommandButton1_Click() Dim ws As Worksheet Dim no_of_copies As Integer Select Case True Case OptionButton1 Set ws = Sheets("verticalordersheet") Case OptionButton2 Set ws = Sheets("verticalvanesordersheet") End Select no_of_copies = Application.InputBox("How many copies do you wish t print?", , 1) ws.PrintOut copies:=no_of_copies, Collate:=True Close End Sub But i get 2 errors 1. is "Run-time error 91" This happens when you do not select a optio button 2. is "Run-time error 1004" This happens when you press the cance button Can you help Thank -- ra ----------------------------------------------------------------------- raw's Profile: http://www.excelforum.com/member.php...fo&userid=2831 View this thread: http://www.excelforum.com/showthread.php?threadid=47898 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pause code, wait for input, no input received, carry on with the code | Excel Programming | |||
Input Box Question with Code | Excel Programming | |||
Input Box Code Please Help!! | Excel Programming | |||
Code for Input Box | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |