Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JFK JFK is offline
external usenet poster
 
Posts: 5
Default FileDialog Object

I use the fileDialog(msoFileDialogOpen) object to select files for a VBA
application. When I allow multiplefiles, and if the files are selected
nonsequentially using the CTRL key, it often happens that copies of the
selected files are made within the open folder inadvertently. Is there any
way to turn of file copying while using this object?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default FileDialog Object

AFAIK, as this dialog behaves the same a Windows (and I would guess is
generated by Windows, not Excel), that behaviour is by design.
The easiest alternative (apart from you users NOT doing it) is to design an
"old" style userform with a drive list box, folder list and file list.
Otherwise a more modern Explorer style interface would be better.
The API route provides for the implementation of a call back from the
dialog. Don't know if that would be useful for this though.

NickHK

"JFK" wrote in message
...
I use the fileDialog(msoFileDialogOpen) object to select files for a VBA
application. When I allow multiplefiles, and if the files are selected
nonsequentially using the CTRL key, it often happens that copies of the
selected files are made within the open folder inadvertently. Is there

any
way to turn of file copying while using this object?



  #3   Report Post  
Posted to microsoft.public.excel.programming
JFK JFK is offline
external usenet poster
 
Posts: 5
Default FileDialog Object

Thanks Nick.

This problem is practically unavoidable in my case because I want the user
to be able to select perhaps 10 or 20 nonsequential files from a folder.
With the CTRL key depressed, if the user's cursor falls between two files in
the list while they are making their next selection, all currently selected
files are copied to the folder.

I wonder if the xlDialogOpen ojbect might solve this problem, or if I can
temporarily designate the folder as read-only.

"NickHK" wrote:

AFAIK, as this dialog behaves the same a Windows (and I would guess is
generated by Windows, not Excel), that behaviour is by design.
The easiest alternative (apart from you users NOT doing it) is to design an
"old" style userform with a drive list box, folder list and file list.
Otherwise a more modern Explorer style interface would be better.
The API route provides for the implementation of a call back from the
dialog. Don't know if that would be useful for this though.

NickHK

"JFK" wrote in message
...
I use the fileDialog(msoFileDialogOpen) object to select files for a VBA
application. When I allow multiplefiles, and if the files are selected
nonsequentially using the CTRL key, it often happens that copies of the
selected files are made within the open folder inadvertently. Is there

any
way to turn of file copying while using this object?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default FileDialog Object

The xlDialogOpen has these arguments:
'1 - 8
'file_text, update_links, read_only, format, prot_pwd, write_res_pwd,
ignore_rorec, file_origin,
'9 - 14
'custom_delimit , add_logical, editable, file_access, notify_logical,
converter

None is obviously involved in changing the behaviour, but with no
documentation on what they mean (e.g. ignore_rorec ??), some quick testing
with True/false values produced nothing useful.
None in the flags for GetOpenFilename API suggest this can be overridden
(except maybe with a callback).

There are various replacement controls that you can control their behaviour,
but then you users will have to install them.
As this is part of Windows drag/drop behaviour, it would be easier if you
can create your own userform with a combobox for drives, a list box for
folders and a list box for files. Update the folders list when drive changes
and update files list when the folder changes. That way the interface does
not support drag/drop.

NickHK

"JFK" wrote in message
...
Thanks Nick.

This problem is practically unavoidable in my case because I want the user
to be able to select perhaps 10 or 20 nonsequential files from a folder.
With the CTRL key depressed, if the user's cursor falls between two files

in
the list while they are making their next selection, all currently

selected
files are copied to the folder.

I wonder if the xlDialogOpen ojbect might solve this problem, or if I can
temporarily designate the folder as read-only.

"NickHK" wrote:

AFAIK, as this dialog behaves the same a Windows (and I would guess is
generated by Windows, not Excel), that behaviour is by design.
The easiest alternative (apart from you users NOT doing it) is to design

an
"old" style userform with a drive list box, folder list and file list.
Otherwise a more modern Explorer style interface would be better.
The API route provides for the implementation of a call back from the
dialog. Don't know if that would be useful for this though.

NickHK

"JFK" wrote in message
...
I use the fileDialog(msoFileDialogOpen) object to select files for a

VBA
application. When I allow multiplefiles, and if the files are

selected
nonsequentially using the CTRL key, it often happens that copies of

the
selected files are made within the open folder inadvertently. Is

there
any
way to turn of file copying while using this object?






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
Excel FileDialog object and Visual Basic 6. droopy928gt[_16_] Excel Programming 0 May 19th 06 02:24 PM
FileDialog AMDRIT Excel Programming 1 October 21st 05 10:17 PM
filedialog Norm Excel Worksheet Functions 0 July 29th 05 10:17 PM
FileDialog - Not available in 2k? RWN Excel Programming 3 March 12th 05 05:25 AM


All times are GMT +1. The time now is 02:07 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"