Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I run an application that opens another file, generates a report, then saves
to another 2 directories. Part of that save is to a historical directory, then to the "Current" directory. I believe the system is crashing because there is an existing file in the folder. It creates some LOG then closes Excel completly. If I clear the folders then it runs perfectly. The files are created. If i uncomment the SetAttr line then it gives me a "cannot find file" error and stops the code. 1) How do I get around the system crash? 2) How do i set file attribute to read only? I am using: RptName = ThisPath & "\" & "Reports" & "\ " & RptName & " " & Format(Date, "yyyymmdd") Application.DisplayAlerts = False Application.DisplayAlerts = False Sheets(ChannelName).Move ActiveWorkbook.SaveAs Filename:=RptName ' SetAttr RptName, vbReadOnly |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
VBA SaveAs Value | Excel Discussion (Misc queries) | |||
SaveAs | Excel Worksheet Functions | |||
Help with SaveAs | Excel Programming | |||
SaveAs,csv | Excel Programming |