View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pierre via OfficeKB.com
 
Posts: n/a
Default userforms broblem

Hi experts,

I have a userform where the user can choose which sheets to print (1, 2 or
both). I use checkboxes sothe user can indicate what he wants.

I have the following code for the OK button:

Private Sub but_ok_Click()
If chkbox_overzicht Then
show_printsub1 'macro that just shows a form where the user can
indicate which columns to print
End If
If chkbox_management Then
Printen_management
End If
Unload Me
Exit Sub
End Sub

This code does not work because if the user checks both boxes the code will
make a preview of sheet one with on top the userform to indicate which
columns to print.

I would like if the two checkboxes are checked to:

first execute the first print instruction (show a new userform for indicating
which columns to print ), then printpreview this sheet and then go to the
next print instruction for printing sheet2.

Any ideas how to adapt the code ?
thanks,
Pierre

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200601/1