1
votes

Ok here is the issue, i need to open a large workbook from another large workbook, it was working fine till now, and i've not changed it, here is the thing it suddenly started crashing when the full path is on a speciffic location.

the address is fine, the password is fine but then when i get to this line:

Workbooks.Open FileName:=PROJECT_DETAILS_WB_FULL_PATH, UpdateLinks:=True, Password:=PROJECT_DETAILS_DECRIPTION_KEY, ReadOnly:=False 'here is the problem

and excel crashes entirely

-Even while running step by step so the "wait" method isn't it
-I have the same issue with office 2013 and 365 so not an office version issue
-Also tried in different computers and the issue persists.
-Replaced the target file with one that 100% works and still.
-if i open the file manually it works (there is a check for the file been already open)

My guess is that it is a folder permit or file permit issue on the target path, if anyone know what I should check for that would be helpfull

2
What happens when you change UpdateLinks:=True to UpdateLinks:=False?Siddharth Rout
no change, still crashesCarlos Raúl Gómez
If you change the location of the file to desktop or a folder where you have read/write access, then what happens?Siddharth Rout
ok let me get into more detail, for the time been we have 2 cloud systems at work, one custom made and dropbox, I have it set so the parent file automatically chooses either the drop box or the custom made. On the dropbox version (exact same files) all works like a charm, however in the custom cloud it all went to hell yesterday (it was working fine till 2 days ago) and if i try to open the files in the custom cloud excel crashesCarlos Raúl Gómez

2 Answers

2
votes

Ok guys and girls, thanks for your help, after poking around all day I found the issue, in summary, file "A" was trying to open file "B" and excel crashed, turns out that file "B" has links to another file, file "C", which was not up to date, those links are to named ranges that didn't exist in the older version of file "C".

When file "B" attempted to check (before "UpdateLinks:=True") excel crashed, updating file "C" to the latest version worked. Note that when prompted to update the links manually, Excel does not crash regardless of what you choose.

0
votes

Try the following code.

Sub openwb()
Dim wkbk As Workbook
Dim NewFile As Variant

NewFile = Application.GetOpenFilename("microsoft excel files (*.xlsm*), *.xlsm*")

If NewFile <> False Then
Set wkbk = Workbooks.Open(NewFile)
End If
End Sub