Public Function GetFile(ByVal Path As String) As String Dim pVlax As New VLAX If Right(Path, 1) <> "\" Then Path = Path & "\" Path = Replace(Path, "\", "\\") GetFile = pVlax.EvalLispExpression("(getfiled ""选择文件"" """ & Path & """ ""dwg"" 8)") Set pVlax = Nothing End Function
Public Sub ggg() MsgBox GetFile(Application.Path) End Sub