![]() |
VB Debug Reset
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? |
VB Debug Reset
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? |
All times are GMT +1. The time now is 11:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com