Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I wrote VB code to saveas an Excel file to a network location.
My preimptive code 1st. then, ActiveWorkbook.SaveAs Filename:= _ "http://...../Excelfile.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False When the code is ran it will perform everything else in the code properly until it gets to this part. At this part the code stops and brings up a Debug box. I End on the Debug box and run the code again, typically on the 2nd run attempt it runs with no error or Debug box coming up. Note this does not happen every time the code is run. Usually it happens the first time the code is run after the Excel file is first opened. What I am looking for is how can I make the code show a "Retry Yes/No" box with the option to start over, or end, and basically make the code do, auotmatically, what I do, END on the Debug box and restart the code. Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I used "On Error Resume Next" to get the code to not show the Debug error box
but how can I get the code to let my user know to run the macro again if the "On Error Resume Next" is activated? "SJW_OST" wrote: I wrote VB code to saveas an Excel file to a network location. My preimptive code 1st. then, ActiveWorkbook.SaveAs Filename:= _ "http://...../Excelfile.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False When the code is ran it will perform everything else in the code properly until it gets to this part. At this part the code stops and brings up a Debug box. I End on the Debug box and run the code again, typically on the 2nd run attempt it runs with no error or Debug box coming up. Note this does not happen every time the code is run. Usually it happens the first time the code is run after the Excel file is first opened. What I am looking for is how can I make the code show a "Retry Yes/No" box with the option to start over, or end, and basically make the code do, auotmatically, what I do, END on the Debug box and restart the code. Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
debug code | Excel Discussion (Misc queries) | |||
When I try to save, it says debug, what does that mean? | Excel Discussion (Misc queries) | |||
DeBug | Excel Discussion (Misc queries) | |||
Using the fx key to debug formulas | Excel Discussion (Misc queries) | |||
help with debug | New Users to Excel |