Below code is select file folders in my win10+office 2019, i reference Office 16 Object Library first then reference Dao 3.6 Object Library ,its work.
BUT another computer win7+office 2019,, has error Microsoft Dao 3.6 Object Library conflict with Office 16 Object Library.
how to solve this problem?
thank you!
KHT
Private Sub CmdSelect_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.AllowMultiSelect = False
.Title = "Select TrustedLocation"
.Filters.Clear
If .Show = True Then
For Each varFile In .SelectedItems
Me.TxtFolderPath = varFile
Next
End If
End With
End Sub
BUT another computer win7+office 2019,, has error Microsoft Dao 3.6 Object Library conflict with Office 16 Object Library.
how to solve this problem?
thank you!
KHT
Private Sub CmdSelect_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.AllowMultiSelect = False
.Title = "Select TrustedLocation"
.Filters.Clear
If .Show = True Then
For Each varFile In .SelectedItems
Me.TxtFolderPath = varFile
Next
End If
End With
End Sub