View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default File Open (via browse) and then run my recorded macro


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
---------------
Jacob Skaria


"Kolz" wrote:

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