Hi All,
I found some code to select a file to open.
This works really well.
I'm trying to build a macro that will switch to this file later on.
Windows (fNameAndPath).Activate
But I keep getting an error, I've tried to add " but no joy.
Can someone help please?
Original code:
I found some code to select a file to open.
This works really well.
I'm trying to build a macro that will switch to this file later on.
Windows (fNameAndPath).Activate
But I keep getting an error, I've tried to add " but no joy.
Can someone help please?
Original code:
Code:
Sub GetFile()
Dim fNameAndPath As Variant
fNameAndPath = Application.GetOpenFilename(FileFilter:="Excel Files (*.XLS), *.XLS", Title:="Select File To Be Opened")
If fNameAndPath = False Then Exit Sub
Workbooks.Open Filename:=fNameAndPath
End Sub