Hello!

I am facing an issue. I am using the following code to open certain files. However, I haven't found a way to use the file I open in other macros/modules (for example, activate, etc). Could you please help me out? Thanks.

Set fd = Application.FileDialog(msoFileDialogFilePicker)

With fd

.AllowMultiSelect = False

.Title = "Please select filename file."

.Filters.Clear
.Filters.Add "filename", "*.xls?"

If .Show = True Then
fileName = Dir(.SelectedItems(1))

End If
End With

Workbooks.Open (fileName)