Dear Learned people,
the following code is meant to present a user with the opportunity to be able to select a file that is in the folder "01_ElementLists". currently the code only takes the user to the list of files residing on the desktop, and the user must then know what the path to the file is.
what can be changed /added to the code, to let the user go directly to the '01_ElementLists' folder?
the following code is meant to present a user with the opportunity to be able to select a file that is in the folder "01_ElementLists". currently the code only takes the user to the list of files residing on the desktop, and the user must then know what the path to the file is.
what can be changed /added to the code, to let the user go directly to the '01_ElementLists' folder?
Code:
Dim wkb2 As Workbook Dim UsersName As String
UsersName = Environ("USERNAME")
strFileName = "C:\Users\" & UsersName & _
"\Desktop\Excalibur Winner\ExcaliburProPlus\01_ElementLists"
ChDir ThisWorkbook.Path
FileFilter = "Excel 2003 (*.xls),*.xls," & _
"Excel 2007 > (*.xlsx),*.xlsx," & _
"All Excel Files (*.xl*),*.xl*," & _
"All Files (*.*),*.*"
strFileName = Application.GetOpenFilename(FileFilter, 4, "Select One File To Open")
Set wkb2 = Workbooks.Open(strFileName, False, False)[code]
your help is always appreciated.
best regards
Andy PegLeg