Message 1 of 4
how to find a path of a file?
Not applicable
03-25-2016
05:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the USERFORM of vba in acad, I have a button to find a file path by choosing it through the window, here is my codes, and it said, Object does't support this property or method. I have load the reference of Microsoft office library, and I can't find the reference of msofiledialog. Can you help me with this?
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
With fd
.AllowMultiSelect = True
If .show = -1 Then
For Each vrtSelectedItem In .SelectedItems
MsgBox "Selected item's path: " & vrtSelectedItem
Next
Else
End If
End With
Set fd = Nothing