A.D.Tejpal
ad_tp at hotmail.com
Fri May 2 02:39:24 CDT 2003
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/7aa39e18/attachment-0001.html>