Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel FileDialog object and Visual Basic 6. | Excel Programming | |||
FileDialog | Excel Programming | |||
filedialog | Excel Worksheet Functions | |||
FileDialog - Not available in 2k? | Excel Programming |