Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 26th, 2007, 09:39 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


  #2 (permalink)  
Old October 26th, 2007, 09:42 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found it - Nevermind

  #3 (permalink)  
Old October 26th, 2007, 09:47 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Call windows' "Open file" dialog box from an swf vicky_barse Flash (all versions) 1 December 30th, 2005 12:47 PM
Help need in setting up Call to Open dialog box method Access VBA 3 August 9th, 2005 01:38 AM
Open File Dialog Box KennethMungwira VB.NET 3 August 3rd, 2003 09:44 PM
Open directory dialog box mkpriya VS.NET 2002/2003 6 July 2nd, 2003 07:24 AM
Open File Dialog Box KennethMungwira VB.NET 2 June 27th, 2003 04:36 PM





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