GetOpenFilename Question

J

JackJ

When using this dialog box, it is useful sometimes to help users make their
selection, like you can with GetSaveAsFilename, thus:

st = Application.GetSaveAsFilename(Cells(3, 9), "*.mat, *.mat")

But when I try inserting a cell reference into GetOpenFilename it fails,
thus:

st = Application.GetOpenFilename(Cells(3, 9), "*.mat, *.mat")

This fails.

None of my books seems to address this. Has anybody a solution?

Thanks
 
C

Chip Pearson

Jack,

The syntax of GetOpenFilename is different than that of
GetSaveAsFilename, namely that GetOpenFilename doesn't have an
InitialFileName arguement. See help for the exact syntax of both
methods.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

Tom Ogilvy

Unfortunately, you can't make up arguments for a function.

the getopenfilename does not have an InitialFileName property (like
GetSaveAsfilename)

See help for details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top