Thread: ehandler
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Oldjay Oldjay is offline
external usenet poster
 
Posts: 337
Default ehandler

If ehandler1 is activated I want to be able to have the option of going on to
the code below On Error GoTo ehandler2.

On Error GoTo ehandler1

quotenumber1 = InputBox("Please enter QUOTE file name to save to your C
drive & Server3", _
"X Technologies LLC", NUMBERSAVE)
QUOTE = "C:\Quick Quotes3\" & NUMBERSAVE & ".XLS"
ActiveWorkbook.SaveAs Filename:=QUOTE

On Error GoTo ehandler2

QUOTE1 = "\\server3\jobs\estimate1\Quick Quotes3\" & NUMBERSAVE & ".XLS"
ActiveWorkbook.SaveAs Filename:=QUOTE1
ActiveWorkbook.Close
'End 6/09/08 revision

Application.Goto Reference:="InPutForm"
Range("AB2").Select

MainMenu.Show vbModeless
Exit Sub

ehandler1:
MsgBox "You cancelled the save or an error has occured connecting to the
C:\Quick Quotes3\. Check your C: drive and try again ", vbCritical +
vbOKOnly, "File not saved!"

ActiveWorkbook.Close
Windows(MasterSheet).Activate
Sheets("Input").Select
MainMenu.Show vbModeless
Exit Sub

ehandler2:
MsgBox "You cancelled the save or an error has occured connecting to the
Server3. Check your connection and try again ", vbCritical + vbOKOnly, "File
not saved!"
ActiveWorkbook.Close
Windows(MasterSheet).Activate
Sheets("Input").Select
MainMenu.Show vbModeless
Exit Sub

Windows(MasterSheet).Activate
Sheets("Input").Select
MainMenu.Show vbModeless
End Sub