I write a script like this:
Sub Button_Click()
objFile = Application.GetOpenFilename(fileFilter:="All Files (* . *) , * . * ") ' choose load path
.....
Call main_function
End Sub
This is the script of an Excel macro button to let the user browse the file. Actually, I want use this to load an Excel file and use that Excel file’s data in the main_function(the current excel).
How can I do this?
Guess you want to restrict the user to Excel only, so I modified the filter for you