Dave - Followup questions for GetOpenFilename
Posted by SHANE on May 02, 2001 7:31 AM
Dave - At bottom is the code you provided to avoid links. I have a few follow up questions.
(1) I get a program error if I include the following code "If SfileToOpen = False Then Exit Sub" but if I leave it out the macro seems to work.
(2) If I want to update links after I've opened a file with this function, how can I do it?
(3) If I save a file after performing this function, will I be able to update the links if I open the file again.
(4) how can I make this function easily available to multiple users who may not be code or even macro savvy?
Sooooo many questions.
Thanks tons!
Shane, I wouldn't rely on users to type in file names into a InputBox, they WILL stuff it upe every time :o) Use the GetOpenFileName instead.
Sub TryThis()
Dim SfileToOpen As String
SfileToOpen = Application.GetOpenFilename
If SfileToOpen = False Then Exit Sub
Workbooks.Open FileName:=SfileToOpen, UpdateLinks:=0
End Sub
Dave