File Open (via browse) and then run my recorded macro

  • Thread starter Thread starter Kolz
  • Start date Start date
K

Kolz

Rookie I am ...

I record macros ever now and then ... good at hitting the record button...

But, now i want to know how to program a macro to 1st locate the file via
browse, then paste in my recorded macro.

What is the code to prompt a file, browse, open ? and then how should I
integrate that into my recorded macro.

Thanks in advance for your help
 
Dim strFile as String

With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Filters.Add "My Files", "*.xls", 1
.InitialFileName = "C:\"
.Show
strFile = .SelectedItems(1)
End With

If this post helps click Yes
 
Back
Top