Hi guys back again
I have a user form with 3 options buttons and one command button you
press when you have selected one
Option button 1. is a print a worksheet out (that works fine)
option button 3. is a return to main sheet (that works fine)
It is the second option button i have that has problems it is a print
preview options
I recorded a macro to show a print preview of the worksheet but when
you select this in goes in to the print preview but the form remains in
the print preview page and it crashes excel!!!!
He is my code
Private Sub CommandButton1_Click()
If OptionButton1 Then
Sheets("mini worksheet").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("mini input").Select
ElseIf OptionButton2 Then
Sheets("mini worksheet").Select
ActiveWindow.SelectedSheets.printpreview
ElseIf OptionButton3 Then
Sheets("Heroal main page ").Select
End If
End Sub
Can you help
Thanks
--
raw
------------------------------------------------------------------------
raw's Profile:
http://www.excelforum.com/member.php...o&userid=28312
View this thread:
http://www.excelforum.com/showthread...hreadid=479967