I have been running a macro for a few weeks. All of a sudden it began
stopping on one line, with no error message. I hit the play button and
the macro continues to the end.
Any ideas?
TIA
Gerry
I have been running a macro for a few weeks. All of a sudden it began
stopping on one line, with no error message. I hit the play button and
the macro continues to the end.
Any ideas?
TIA
Gerry
Tell us what the line is, Gerry.
--
Gary Brown
"Gerry" wrote:
> I have been running a macro for a few weeks. All of a sudden it began
> stopping on one line, with no error message. I hit the play button and
> the macro continues to the end.
>
> Any ideas?
>
> TIA
> Gerry
>
>
Here is the line it is pausing on.
ActiveWorkbook.SaveAs Filename:="C:\Shared
Data\RetailPro\Retail\Rpro\PRINT\Inventory for G Site
old.txt",FileFormat:=xlText, CreateBackup:=False
Gerry
*** Sent via Developersdex http://www.developersdex.com ***
My best guess is that in the past, after creating the file "Inventory for G
Site old.txt", it has been moved, deleted and/or name changed.
Try putting the following lines in front of the line that is pausing...
Application.DisplayAlerts = False 'turn warnings off
Kill :="C:\Shared Data\RetailPro\Retail\Rpro\PRINT\Inventory for G Site
old.txt"
Application.DisplayAlerts = True 'turn warnings on
This will delete the old file without stopping the code/displaying warnings
just before you are creating the file with your line...
> ActiveWorkbook.SaveAs Filename:="C:\Shared
> Data\RetailPro\Retail\Rpro\PRINT\Inventory for G Site
> old.txt",FileFormat:=xlText, CreateBackup:=False
HTH,
--
Gary Brown
gary_brown@ge_NOSPAM.com
If this post was helpful, please click the ''''Yes'''' button next to
''''Was this Post Helpfull to you?".
"Gerry Waldram" wrote:
> Here is the line it is pausing on.
>
> ActiveWorkbook.SaveAs Filename:="C:\Shared
> Data\RetailPro\Retail\Rpro\PRINT\Inventory for G Site
> old.txt",FileFormat:=xlText, CreateBackup:=False
>
> Gerry
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
>
Thanks Gary
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks