View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Select File to Open

Option Explicit
Sub testme01()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename("Excel Files, *.xls")

If myFileName = False Then
Exit Sub
End If

'your code to open that file and do what you want.
End Sub

CrimsonPlague29 wrote:

Hello,

I'm looking for a code that when the user runs the macro it prompts them to
select the file which they want to open ???

Thanks


--

Dave Peterson