Excel VBA
This will allow you to select a file to open. You'll need to add
error handling. See VBE help for options with GetOpenFilename.
Dim strF as String
strF = Application.GetOpenFilename
Workbooks.Open FileName:=strF
HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Hello:
I have a macro that goes to the My Documents folder and
opens a specific file. Is there a way that I can enter a
parameter for the file name, so that I can have the macro
open any filename that I specify?
Thanks for your help.
Theresa
|