Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Path/File access error

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   Report Post  
Posted to microsoft.public.excel.misc
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Path/File access error

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
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
Copying worksheet, path/file access error: '\vbxxx.tmp' goneill3 Excel Discussion (Misc queries) 7 April 4th 23 10:45 AM
Windows cannot access the specified device, path or file. You may Stacey123 Excel Discussion (Misc queries) 1 April 1st 08 08:41 PM
How can I remove an invalid path for an Access file from a pivot CLASSC Charts and Charting in Excel 4 December 2nd 07 02:14 PM
How can I remove an invalid path for an Access file from a pivot CLASSC Charts and Charting in Excel 0 November 30th 07 05:31 AM
Path/File access error: '\VBx.tmp' COB Setting up and Configuration of Excel 3 January 11th 07 07:05 PM


All times are GMT +1. The time now is 07:18 PM.

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

About Us

"It's about Microsoft Excel"