From: Dave K. on
I have the following code in the on click event procedure for a toggle button.

Dim dlgOpen As FileDialog

Set dlgOpen = Application.FileDialog(DialogType:=msoFileDialogOpen)

With dlgOpen
.AllowMultiSelect = True
.Show
End With

End Sub

I want to actually open a file when I clck the open button in the dialog box
not return the file file path.

--
Dave K.
From: Jack Leach dymondjack at hot mail dot on
Get the path of the file as you are doing now and then send it through the
ShellExecute API (as can be found at mvps.org/access in their API section)

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)



"Dave K." wrote:

> I have the following code in the on click event procedure for a toggle button.
>
> Dim dlgOpen As FileDialog
>
> Set dlgOpen = Application.FileDialog(DialogType:=msoFileDialogOpen)
>
> With dlgOpen
> .AllowMultiSelect = True
> .Show
> End With
>
> End Sub
>
> I want to actually open a file when I clck the open button in the dialog box
> not return the file file path.
>
> --
> Dave K.
From: Douglas J. Steele on
Or, assuming that the full path to the selected file is stored in a variable
strFile, use

Application.FollowHyperlink strFile

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Jack Leach" <dymondjack at hot mail dot com> wrote in message
news:7F23D625-8107-45A3-949B-3431C416DF55(a)microsoft.com...
> Get the path of the file as you are doing now and then send it through the
> ShellExecute API (as can be found at mvps.org/access in their API section)
>
> hth
> --
> Jack Leach
> www.tristatemachine.com
>
> "I haven''t failed, I''ve found ten thousand ways that don''t work."
> -Thomas Edison (1847-1931)
>
>
>
> "Dave K." wrote:
>
>> I have the following code in the on click event procedure for a toggle
>> button.
>>
>> Dim dlgOpen As FileDialog
>>
>> Set dlgOpen = Application.FileDialog(DialogType:=msoFileDialogOpen)
>>
>> With dlgOpen
>> .AllowMultiSelect = True
>> .Show
>> End With
>>
>> End Sub
>>
>> I want to actually open a file when I clck the open button in the dialog
>> box
>> not return the file file path.
>>
>> --
>> Dave K.