Are there any similar code that could be used as "Application.GetOpenFilename" in Microstation?
I found it couldn't work.
Hi,
the example how to use Open Design File dialog from MicroStation VBA is delivered with MicroStation installation. Open MdlExamples.mvba project in \Workspace\System\vba\examples\ and check TryOpen method.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thanks.
Let me paste it for easy record.
Private Declare Function mdlDialog_defFileOpen Lib "stdmdlbltin.dll" (ByVal fileName As String, ByVal rFileH As Long, ByVal dlogBoxId As Long, ByVal suggestedFileName As String, ByVal filterString As String, ByVal defaultDirectory As String, ByVal titleString As String, ByVal defaultFileId As Long, ByVal userPrefH As Long) As Long
Sub ....()
Dim oExcelpath As String
oExcelpath = Space(1024)
If mdlDialog_defFileOpen(oExcelpath, 0, 0, "MyFile", "*.xlsx", "D:\", "Select file for test", DEFDGNFILE_ID, 0) = 0 Then
Debug.Print oExcelpath
End If
End Sub