#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Ehandler

I want Errorhandler1 to give the option to save the file to server3. As it is
now
just ends. I can't seem to find the right code

On Error GoTo ehandler1

'Revised saved order 6/09/08
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
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Ehandler

Sorry I double posted this because I got an error message that said the site
was not available and to try later

"Oldjay" wrote:

I want Errorhandler1 to give the option to save the file to server3. As it is
now
just ends. I can't seem to find the right code

On Error GoTo ehandler1

'Revised saved order 6/09/08
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
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"