Type tagOPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long strFilter As String strCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long strFile As String nMaxFile As Long strFileTitle As String nMaxFileTitle As Long strInitialDir As String strTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer strDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" _ Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean Declare Function aht_apiGetSaveFileName Lib "comdlg32.dll" _ Alias "GetSaveFileNameA" (OFN As tagOPENFILENAME) As Boolean Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long Global Const ahtOFN_READONLY = &H1 Global Const ahtOFN_OVERWRITEPROMPT = &H2 Global Const ahtOFN_HIDEREADONLY = &H4 Global Const ahtOFN_NOCHANGEDIR = &H8 Global Const ahtOFN_SHOWHELP = &H10 Global Const ahtOFN_NOVALIDATE = &H100 Global Const ahtOFN_ALLOWMULTISELECT = &H200 Global Const ahtOFN_EXTENSIONDIFFERENT = &H400 Global Const ahtOFN_PATHMUSTEXIST = &H800 Global Const ahtOFN_FILEMUSTEXIST = &H1000 Global Const ahtOFN_CREATEPROMPT = &H2000 Global Const ahtOFN_SHAREAWARE = &H4000 Global Const ahtOFN_NOREADONLYRETURN = &H8000 Global Const ahtOFN_NOTESTFILECREATE = &H10000 Global Const ahtOFN_NONETWORKBUTTON = &H20000 Global Const ahtOFN_NOLONGNAMES = &H40000 Global Const ahtOFN_EXPLORER = &H80000 Global Const ahtOFN_NODEREFERENCELINKS = &H100000 Global Const ahtOFN_LONGNAMES = &H200000