ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using FileDialog or GetOpenFileName To Allow File Creation (https://www.excelbanter.com/excel-programming/335787-using-filedialog-getopenfilename-allow-file-creation.html)

WhyIsDoug

Using FileDialog or GetOpenFileName To Allow File Creation
 
I've tried many different approaches to this and have yet to find a solution.
I need to retrieve a file name or allow the user to create one on the fly
and would like to use either the Application.FileDialog or the
Application.GetOpenFileName methods to do it. However neither one appears to
let the user create a new file name and select the "Open" button. This
capability is available with the Common Dialog ActiveX control using the File
Must Exist flag but seems to be suspiciously absent in these versions that
are supported by Excel 2003.

I would use the Common Dialog control (in fact that is what I am replacing)
except that when running Excel 2003 on a Windows 2000 Professional machine
the Common Dialog dll is marked as "Unsafe" and will not load. I have seen
articles in the MS Knowledge Base that elude to the fact that this can be
fixed with an Office Policy. That seems to be an unacceptable solution to our
infrastructure folks so they want me to code around it.

Any help would be greatly appreciated.

WhyIsDoug?

Tom Ogilvy

Using FileDialog or GetOpenFileName To Allow File Creation
 
Excel doesn't support that manually - so that is probably a reasonable
explanation why it isn't supported in VBA. Maybe you can cobble something
together with Application.GetSaveAsFilename

--
Regards,
Tom Ogilvy

"WhyIsDoug" wrote in message
...
I've tried many different approaches to this and have yet to find a

solution.
I need to retrieve a file name or allow the user to create one on the fly
and would like to use either the Application.FileDialog or the
Application.GetOpenFileName methods to do it. However neither one appears

to
let the user create a new file name and select the "Open" button. This
capability is available with the Common Dialog ActiveX control using the

File
Must Exist flag but seems to be suspiciously absent in these versions that
are supported by Excel 2003.

I would use the Common Dialog control (in fact that is what I am

replacing)
except that when running Excel 2003 on a Windows 2000 Professional machine
the Common Dialog dll is marked as "Unsafe" and will not load. I have seen
articles in the MS Knowledge Base that elude to the fact that this can be
fixed with an Office Policy. That seems to be an unacceptable solution to

our
infrastructure folks so they want me to code around it.

Any help would be greatly appreciated.

WhyIsDoug?





All times are GMT +1. The time now is 08:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com