Thread: Print Box
View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Print Box

Hi Jordon

Sorry again

No problem

Use this
Range("A1:A10,B1:B10").PrintPreview
or
Range("A1:A10,B1:B10,C1:C10").PrintPreview




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jordon" wrote in message ...
Hi Ron,
Sorry again...this works, however..I need to have each checkbox choice show up together on the print preview instead of having

to "close" the print preview to go to the next print area. In other words, the user selects box 1 & 2...the preview window has the
option of clicking on "next" to go to the next choice. Can you help me write the code for this?
Thanks

"Ron de Bruin" wrote:

Hi Jordon

You must Unload the Userform first

like this

Case 1
Unload Me
Range("A1:A10").PrintPreview
Case 3
Unload Me
Range("B1:B10").PrintPreview
Case 5
Unload Me
Range("C1:C10").PrintPreview
Case 4
Unload Me
Range("A1:A10").PrintPreview
Range("B1:B10").PrintPreview


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jordon" wrote in message ...
Thanks again Ron! Great help! Sorry to keep on, but when I add the print preview code after say the first check box...it

works,
previews, but the userform stay on top and does not let me get out of it. Is there a way to close the userform after confirming
selection? Thanks again in advance.

----- Ron de Bruin wrote: -----

Hi Jordon

Add three checkboxes on your userform and one button.
Try this code for the button

Private Sub CommandButton1_Click()
Dim Num As Integer
Num = Abs(CheckBox1.Value) * 1 + _
Abs(CheckBox2.Value) * 3 + _
Abs(CheckBox3.Value) * 5

Select Case Num
Case 1
MsgBox "Run the code for checkbox 1"
Case 3
MsgBox "Run the code for checkbox 2"
Case 5
MsgBox "Run the code for checkbox 3"
Case 4
MsgBox "Run the code for checkbox 1 + 2"
Case 9
MsgBox "Run the code for checkbox 1 + 2 + 3"
Case 6
MsgBox "Run the code for checkbox 1 + 3"
Case 8
MsgBox "Run the code for checkbox 2 + 3"
End Select
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jordon" wrote in message

...
Thanks Ron! One more curve....How can I add check boxes and allow user to select more than one check box which in

turn
previews
multiple print areas? In other words the user checks box 1 and box 2...hits the "OK" button and it previews both of

those
print
areas.
Thanks in advance