Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default GetOpenFilename Question

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default GetOpenFilename Question

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



"JackJ" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default GetOpenFilename Question

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

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

See help for details.

--
Regards,
Tom Ogilvy


"JackJ" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetOpenFilename Todd Htutenstine Excel Programming 2 May 13th 04 03:14 PM
GetOpenFilename Greg Bloom Excel Programming 0 February 9th 04 03:32 PM
GetOpenFilename Wolfgang Excel Programming 1 February 6th 04 07:37 PM
getopenfilename inquirer Excel Programming 1 December 3rd 03 11:37 AM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM


All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"