Message 1 of 4
Not applicable
02-06-2020
04:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Having trouble selecting a data file from a command button on a form in Acad 2020.
The following code gives error message on theFileDiagog(msoFileDialogOpen) line
"Run-time error 438: Object doesn't support this property of method"
Tools -> References include -
Microsoft Office 16.0 Object Library
Microsoft Scripting Runtime
------------------------------
Sub UseFileDialogOpen()
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
End Sub
Solved! Go to Solution.