Thread: Print Box
View Single Post
  #5   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

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