I don't think there is any way to implement #2. Well, there might be
with some amount of hacking with APIs and grabbing control of various
windows and keyboard / mouse movements but IMO it would definitely not
be worth while, not to mention that after all isn't it supposed to be
the user's choice?
Also, without writing your own validation routine no way to enforce #1
either. Note that even with Bob's code, the specification is only an
*initial* setting. The user can always override it. Try it. Run the
code and with the dialog box open, in the Filename field enter *.* and
press the ENTER key.
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article .com,
says...
Hello,
I have failed to be able to get GetOpenFilename method
to restrict the list of files to select from beyond
the stated extentsion???
Is this possible -- and if so how.
What I mean is that I want the list to not include
ALL .xls files but rather a more narrow list such
as "orders*.xls" -- this list would be only the files
that began with "orders" and had a .xls extentsion.
2nd question, is it possible to force the file list
produced by GetOpenFilename -- to be have it in
<details mode and sorted by daye newest to oldest.
I know I can do this -- one the select window is
opened by this method. But can I override the default
<list setting.
Thanks in advance.
Sincerely,
Kevin Waite