Hi All,
Can anyone assist with the last line of the below code, not quite sure what's wrong with the statement, but it comes out highlighted in yellow when i try to run it:
Dim fName As Variant
Dim wb As Workbook
Dim file_name As Variant
fName = Application.GetOpenFilename(FileFilter:="Excel Files (*.XLSX), *.XLSX", Title:="Select File To Be Opened")
If fName = False Then Exit Sub
Workbooks.Open Filename:=fName
Set wb = Workbooks(fName & ".xlsx")
Thanks
Can anyone assist with the last line of the below code, not quite sure what's wrong with the statement, but it comes out highlighted in yellow when i try to run it:
Dim fName As Variant
Dim wb As Workbook
Dim file_name As Variant
fName = Application.GetOpenFilename(FileFilter:="Excel Files (*.XLSX), *.XLSX", Title:="Select File To Be Opened")
If fName = False Then Exit Sub
Workbooks.Open Filename:=fName
Set wb = Workbooks(fName & ".xlsx")
Thanks