#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default 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?

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
debug code mohavv Excel Discussion (Misc queries) 1 November 27th 07 09:56 PM
When I try to save, it says debug, what does that mean? kali Excel Discussion (Misc queries) 1 January 10th 07 03:17 AM
DeBug Ollie Excel Discussion (Misc queries) 4 April 28th 06 03:17 PM
Using the fx key to debug formulas Bill Excel Discussion (Misc queries) 1 February 24th 06 04:38 AM
help with debug Rusty New Users to Excel 3 February 2nd 05 03:16 AM


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

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

About Us

"It's about Microsoft Excel"