William Hindman
wdhindman at bellsouth.net
Fri May 2 05:06:43 CDT 2003
...just keep in mind that the File Dialog Object doesn't work in a runtime
app :(
William
----- Original Message -----
From: "A.D.Tejpal" <ad_tp at hotmail.com>
To: <accessd at databaseadvisors.com>
Sent: Friday, May 02, 2003 3:39 AM
Subject: Re: [AccessD] Open File Dialog - multiple selections One
MoreSimpleQuestion
Mark,
In Access 2002, you can also try FileDialog Object. The code given below
will display a dialog box for File Selection. Based upon user's choice, the
variable TargetFile will give Full Path of each Selected File.
-------------
Code Start
-------------
Dim fdg as Object, TargetFile As String
Dim SLF As Variant
Set fdg = Application.FileDialog(3)
' Arguments - 1(FileOpen), 2(FileSaveAs), 3(FilePicker), 4(FolderPicker)
With fdg
.Title = Space(71) & "Select Source Files"
.AllowMultiSelect = True
If .Show <> 0 Then
For Each SLF In .selecteditems
TargetFile = Trim(SLF)
' Note - Take Suitable Action Here On TargetFile
Next
End If ' Show
End With ' fdg
-------------
Code End
-------------
Regards,
A.D.Tejpal
----------------------------
----- Original Message -----
From: Stuart McLachlan
To: MarkH ; accessd at databaseadvisors.com
Sent: Friday, May 02, 2003 04:07
Subject: RE: [AccessD] Open File Dialog - multiple selections One More
SimpleQuestion
In the example I gave, was " OpenFile.lpstrFile = String(257, 0)"
That is large enough for a single file, you will need to enlarge it
for multiple files.
On 1 May 2003 at 14:59, MarkH wrote:
> Hi again...
>
> I got the dialog working fine, BUT... If I select more than a handful
> of files then nothing gets returned.
>
> Is there a limit?
>
> In some cases I may be looking to select 50 or 60 files at a time...
>
> Thanks again
>
> Mark
----------------------------------------------------------------------------
----
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>