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:
Sub getfolder() Dim dlgOpen As FileDialog Dim strFolder As String Set dlgOpen = Application.FileDialog( _ FileDialogType:=msoFileDialogFolderPicker) With dlgOpen .AllowMultiSelect = False .Show End With 'get the selected item into strFolder somehow 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.




Reply With Quote