Thread: Excel macros
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Excel macros

"salonowiec" wrote in message
<snip
In 2 - after
If Not vFile = False Then
I'm getting error Type mismatch


change
vFile = Application.GetOpenFilename(sFileFilter, sTitle)


to

vFile = Application.GetOpenFilename(sFileFilter, , sTitle)

'' or with named arguments
' vFile = Application.GetOpenFilename( _
FileFilter:=sFileFilter, _
Title:=sTitle)

FWIW, originally my code had the named arguments which I striped out so the
code could fit in one line in the post, oh well....

Regards,
Peter T