3

Help me to hunt down a question.

Then I am trying to open or save a spreadsheet in excel it always shows me a downloading status bar without any progress. After few minutes the file opens or not. Game of chance. When it didn`t open I get this error message "file opened by another user".

I should notice that I have windows 7, office 2007. I tried to transfer some files to another pc and at first it`s working good, without any troubles, but then still the same problem. Pops up a dialog window with the message. It happens on network files only.

Of course I have tried to run excel in a save mode and in compatibility mode. But nothing change. Give me please any clue what can it be and how can I fix it?

  • Is it the office program bringing up the dialog, asking to open read only, notify when free, or create a local copy? If so, there is a different issue – Canadian Luke Dec 25 '14 at 15:33
-2

Try to start excel with the /a switch on the command line. It can be caused by macroses or add-ins, but in this case you can load excel without this startup files.

Also enable the Ignore Other Applications that use Dynamic Data Exchange feature. Open Excel Options, click Advanced at the left side of the dialog window. Then make sure that DDE is selected.

Next try the following: open Tools – Folder options. In the list of the file types choose XLS. Then click the Advanced. Select Open. The Application Used to Perform Action box contains the actual command line used to start Excel. You should add in this field a space followed by "%1". Be sure to include the quotes. And deselect Use DDE. That’s all a can recommend.

1

I had the same issue several years ago trying to open up a network file from overseas. If someone already had it open, Excel would try to open it for several minutes before saying it was in use.

I used the code below, very similar to Sid's code here.

The code tries to write to a file C;\mywork.xls (change your file path to suit), if there is an error the file is already open, else the file is opened. The error check occurs immediately rather than with a time lag.

Sub Sample()
    Dim Ret
    Dim Wb As Workbook
    Dim strFile As String
    styrfile = "C:\myWork.xlsx"
    Ret = IsWorkBookOpen(strFile)
    If Ret = True Then
        MsgBox "File is open"
    Else
        Set Wb = Workbooks.Open(strFile)
    End If
End Sub

Function IsWorkBookOpen(FileName As String)
    Dim ff As Long, ErrNo As Long

    On Error Resume Next
    ff = FreeFile()
    Open FileName For Input Lock Read As #ff
    Close ff
    ErrNo = Err
    On Error GoTo 0

    Select Case ErrNo
    Case 0:    IsWorkBookOpen = False
    Case 70:   IsWorkBookOpen = True
    Case Else: Error ErrNo
    End Select
End Function
  • Can you explain how to use this code? – fixer1234 Dec 26 '14 at 4:57
0

You can use procexp to track down who else has opened the file.

enter image description here

Using th PID (procid) you can check what programm and user has opened it. For that run tasklist.exe in an elevated cmd.exe.

(This is helpfull when the file has been opened from the PC you work on. If it has been openden from another PC, run net files on the server who hosts the share to get the PC and the user who has opened it).

  • This wont help though with the initial delay in trying to open the file when someone else is already accessing it. – brettdj Dec 25 '14 at 12:22
  • This is a way to check who has the file opened. Isn't that the question? – marsh-wiggle Dec 25 '14 at 12:24
0

Microsoft locks files being open to 1 user at a time, to prevent changes made being overwritten by another user who has the file open before changes are saved.

Is there a reason this file is stored on the network, not on local computer?

If you do need to open the file, I would suggest opening it as a Read-Only file

Try creating a .bat file to open the file as read-only which allows multiple users.

Make sure you include the quote marks if there are any spaces in the file path or name. "LocalDrive:\ExcelPath\excel.exe" /r "NetworkDrive:\WorkbookPath\Workbook.xls"

Alternatively - Use a HTML document to link to the file as a download? This will save a temporary file on your local machine allowing full access, which you can then re-up to the network drive.

<a href="NetworkDrive:/WorkbookPath/Workbook.Xls" download>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.