Multi Select file by browsing in folder ?

Hi Friends,

I get some code that can work on VBA of Excel, just like below. By running below code on Excel VBA, I can get the full path of selected SW drwing doc.

Sub OpenFile()

    Dim f, x, wb

    f = Application.GetOpenFilename("SW Draw Doc,*.slddrw,", 1, MultiSelect:=True)

   

    For x = 1 To UBound(f)

        Cells(x, 1) = f(x)

    Next x

   

End Sub

However, while I put this code into VBA of SOLIDWORKS, it doesn't work. what is the reasion ?

or I just want to get full path of selected SW drwing files, if there is another way , I am very pleased to try .

pls help to advise

thank you very much.

regards

Vincent

SolidworksApi macros