p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Need path from Open dialog box call (http://p2p.wrox.com/showthread.php?t=63275)

bab02 October 26th, 2007 09:39 PM

Need path from Open dialog box call
 
Is there a way to read the path from the Open dialog box once a user navigate to a file? Using the code below:

' Display the Open dialog box and allow a user to select multiple files to open.
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(FileDialogType:=msoFileDial ogOpen)
With dlgOpen
    .AllowMultiSelect = True
    .Show
End With

Thanks



bab02 October 26th, 2007 09:42 PM

Found it - Nevermind


bab02 October 26th, 2007 09:47 PM

Dim lngCount As Long

    ' Open the file dialog
    With Application.FileDialog(msoFileDialogOpen)
        .AllowMultiSelect = True
        .Show

        ' Display paths of each file selected
        For lngCount = 1 To .SelectedItems.Count
            MsgBox .SelectedItems(lngCount)
        Next lngCount

    End With



All times are GMT -4. The time now is 03:07 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.