Results 1 to 4 of 4

Runtime-error '1004' cannot access the file, depending on the computer

Threaded View

yuichi Runtime-error '1004' cannot... 11-28-2012, 03:26 PM
yuichi Re: Runtime-error '1004'... 11-29-2012, 04:53 PM
yuichi Re: Runtime-error '1004'... 12-03-2012, 05:59 PM
yuichi Re: Runtime-error '1004'... 12-03-2012, 06:05 PM
  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    4

    Runtime-error '1004' cannot access the file, depending on the computer

    Hi all,

    The context:
    I have an Excel file on a SharePoint server.
    People can open it, edit it, save it.
    When they save it, there is a macro to save a copy on the network (public drive), and replace the previous copy if it exists :

    Private Sub Workbook_BeforeSave()
         
        Dim FName           As String
        Dim FPath           As String
           
        FPath = "P:\Back Up"
        FName = Sheet1.Range("B1").Text
        ThisWorkbook.SaveCopyAs Filename:=FPath & "\" & FName & " Back Up" & ".xlsm"
     
    End Sub
    The problem:
    If I do it from my computer, it always works.
    But for some people, I always get this error :

    Runtime-error '1004' 
    Excel cannot access the file. Possible reasons :
    - File name or path does not exist
    - File is being used by another program
    - Workbook as the same name as a currently open workbook
    The file is saved on SharePoint but the copy is not saved.

    ----

    I did some researches but did not find anything.
    Last edited by yuichi; 11-28-2012 at 04:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1