How can I load FileDialog? (VBA)

Hello all,

how can I load FileDialog from UserForm? I need load folder path to TextBox and I need open FileDialog via button.  How can I set it? If I use this code:

<p>    Dim fDialog As FileDialog, result As Integer</p><p>    Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)</p><p></p><p>    'Optional: FileDialog properties</p><p>    fDialog.Title = "Select a folder"</p><p>    fDialog.InitialFileName = "C:\\"</p><p>     </p><p>    If fDialog.Show = -1 Then</p><p>      Debug.Print fDialog.SelectedItems(1)</p><p>    End If</p>

macro end with error: Object doesn't support this property or method.

Do I have to set some object as SldWorks? In my opinion this is process in Windows, not in Solidworks. I haven't got allow some library (Tools -> References).

Thnaks a lot for your answers.

SolidworksApi macros