Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have this macro that I created that seem to to working fine except I keep
getting the "Path/File access error" after the code as run for a while. Then I get a "Method SaveCopyAs of Object Workbook failed" error" whenI try to clear the initial error. This code is suppose to loop through a range and perform a action between the for loop below. Everything seem to be working fine, at least through 45 loops, more or less, then the error pops up. I don't know how to find the problem so I can try and fix it. Any ideas? '''''''''' Beginning of For Loop '''''''''''''' For Each c In Worksheets("RFDS Tracker").Range("A4:A" & lastRow) Worksheets("RFDS Tracker").Activate c.Activate active_cell = c.Address '''''''''' Ending of For Loop ''''''''''''''''''''' Worksheets("RFDS Form").Activate '''''''''''' RENAME THE RFDS WORKSHEET '''''''''''''''''''' Worksheets("RFDS Form").Select Worksheets("RFDS Form").Name = Worksheets("RFDS Form").Range("B8").Value '''''''''''' SAVE THE FILE '''''''''''''''''''' fileName = ActiveSheet.Range("B8").Value & "_Ver" & ActiveSheet.Range("I19").Value & " " _ & Format(Date, "mmm d yyyy") ActiveWorkbook.SaveCopyAs Saveto_Folder & fileName & ".xls" Worksheets(Left(fileName, 6)).Select Worksheets(Left(fileName, 6)).Name = "RFDS Form" Next c |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just ran the code again manually and nothing happened. Everything worked as
it should with no errors. What could be the problem. I am stumped. "Ayo" wrote: I have this macro that I created that seem to to working fine except I keep getting the "Path/File access error" after the code as run for a while. Then I get a "Method SaveCopyAs of Object Workbook failed" error" whenI try to clear the initial error. This code is suppose to loop through a range and perform a action between the for loop below. Everything seem to be working fine, at least through 45 loops, more or less, then the error pops up. I don't know how to find the problem so I can try and fix it. Any ideas? '''''''''' Beginning of For Loop '''''''''''''' For Each c In Worksheets("RFDS Tracker").Range("A4:A" & lastRow) Worksheets("RFDS Tracker").Activate c.Activate active_cell = c.Address '''''''''' Ending of For Loop ''''''''''''''''''''' Worksheets("RFDS Form").Activate '''''''''''' RENAME THE RFDS WORKSHEET '''''''''''''''''''' Worksheets("RFDS Form").Select Worksheets("RFDS Form").Name = Worksheets("RFDS Form").Range("B8").Value '''''''''''' SAVE THE FILE '''''''''''''''''''' fileName = ActiveSheet.Range("B8").Value & "_Ver" & ActiveSheet.Range("I19").Value & " " _ & Format(Date, "mmm d yyyy") ActiveWorkbook.SaveCopyAs Saveto_Folder & fileName & ".xls" Worksheets(Left(fileName, 6)).Select Worksheets(Left(fileName, 6)).Name = "RFDS Form" Next c |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying worksheet, path/file access error: '\vbxxx.tmp' | Excel Discussion (Misc queries) | |||
Windows cannot access the specified device, path or file. You may | Excel Discussion (Misc queries) | |||
How can I remove an invalid path for an Access file from a pivot | Charts and Charting in Excel | |||
How can I remove an invalid path for an Access file from a pivot | Charts and Charting in Excel | |||
Path/File access error: '\VBx.tmp' | Setting up and Configuration of Excel |