Results 1 to 13 of 13

Thread: [RESOLVED] Got dialog now what? /Final goal: folder contents 2 Excel SO Resolved

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2002
    Posts
    111

    Resolved [RESOLVED] Got dialog now what? /Final goal: folder contents 2 Excel SO Resolved

    Can't load vb on this computer so I can't use common dialog controls...which means I am stuck with the stuff in Excel and VBA.

    zaza posted something like this on another thread:

    VB Code:
    1. Sub getfolder()
    2.  
    3. Dim dlgOpen As FileDialog
    4. Dim strFolder As String
    5.     Set dlgOpen = Application.FileDialog( _
    6.         FileDialogType:=msoFileDialogFolderPicker)
    7.     With dlgOpen
    8.         .AllowMultiSelect = False
    9.         .Show
    10.     End With
    11. 'get the selected item into strFolder somehow
    12. End Sub

    This does get me the dialog box for folders (yay - figured that out) but I can't figure out how to get the selected folder into my string.

    I tried adding:
    strFolder = dlgOpen.selectedItems

    but that just gets me a compile error 'argument not optional'

    but since I don't know what arguments I need, that error is not so informative.

    -- then somehow using that folder name I am using Dir to get the folders and files to drop into the Excel Spreadsheet...but let me fuss out that part. For now.
    Last edited by Kantalope; Mar 23rd, 2006 at 03:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width