macro pauses
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 |
macro pauses
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 |
macro pauses
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 *** |
macro pauses
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 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 *** |
macro pauses
Thanks Gary
|
All times are GMT +1. The time now is 05:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com