i have got this code:
Sub openMyStatsData()
Dim myFileName As Variant
myFileName = Application.GetOpenFilename '(FileFilter:="Excel Files,*.xlsx*;*.xlsm*")
If fileName <> False Then
Workbooks.Open (myFileName)
End If
End Sub
the dialog window opens and it let me browse and choose the file i want but when i click on the Open button nothing else happens. i need to be able to browse for the file and open it.
I am new to VBA in case you were wondering. thanks!