<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Folder Browser Needed for VBA 7 64 bit. in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5602425#M128965</link>
    <description>&lt;P&gt;Hello,Could you please help me , in this code i am trying to open a save dialog box to save a file, but i am not able to open.&lt;/P&gt;&lt;P&gt;i tried it on OFFICE 10 (64 bit).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Function MSA_GetSaveFileName(msaof As MSA_OPENFILENAME) As Integer&lt;BR /&gt;' Opens the file save dialog.&lt;BR /&gt;&lt;BR /&gt;Dim of As OPENFILENAME&lt;BR /&gt;Dim intRet As Integer&lt;BR /&gt;Dim strPath As String&lt;/P&gt;&lt;P&gt;'Const OFN_ALLOWMULTISELECT = &amp;amp;H200&lt;BR /&gt;'Const OFN_CREATEPROMPT = &amp;amp;H2000&lt;BR /&gt;'Const OFN_EXPLORER = &amp;amp;H80000&lt;BR /&gt;'Const OFN_FILEMUSTEXIST = &amp;amp;H1000&lt;BR /&gt;'Const OFN_HIDEREADONLY = &amp;amp;H4&lt;BR /&gt;'Const OFN_NOCHANGEDIR = &amp;amp;H8&lt;BR /&gt;'Const OFN_NODEREFERENCELINKS = &amp;amp;H100000&lt;BR /&gt;'Const OFN_NONETWORKBUTTON = &amp;amp;H20000&lt;BR /&gt;'Const OFN_NOREADONLYRETURN = &amp;amp;H8000&lt;BR /&gt;'Const OFN_NOVALIDATE = &amp;amp;H100&lt;BR /&gt;'Const OFN_OVERWRITEPROMPT = &amp;amp;H2&lt;BR /&gt;'Const OFN_PATHMUSTEXIST = &amp;amp;H800&lt;BR /&gt;'Const OFN_READONLY = &amp;amp;H1&lt;BR /&gt;'Const OFN_SHOWHELP = &amp;amp;H10&lt;BR /&gt;&lt;BR /&gt;MSAOF_to_OF msaof, of&lt;BR /&gt;of.Flags = 0 '2 ^ 3 Or 2 ^ 9&lt;BR /&gt;of.Flags = of.Flags Or OFN_HIDEREADONLY&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;intRet = GetSaveFileName(of)&lt;/FONT&gt;&lt;BR /&gt;If intRet Then&lt;BR /&gt;OF_to_MSAOF of, msaof&lt;BR /&gt;strPath = _&lt;BR /&gt;Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1)&lt;BR /&gt;End If&lt;BR /&gt;MSA_GetSaveFileName = intRet&lt;BR /&gt;End Function&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2015 06:40:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-22T06:40:48Z</dc:date>
    <item>
      <title>Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365217#M128948</link>
      <description>&lt;P&gt;I need a folder browser for VBA 7 64 bit that I can set the initial Folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are my options?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot figure out how to convert my 32 bit Windows API code to 64 bit.&lt;/P&gt;&lt;P&gt;I have the declare and UDT written properly but not all the rest that does the work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the Window Shell Object, but could not get the initial directory to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 19:09:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365217#M128948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-13T19:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365278#M128949</link>
      <description>&lt;P&gt;I have not tried this myself as we're still on 2013, but in theory you should be able to use the PtrSafe keyword like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Private Declare PtrSafe Function GetFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (popenfilename As OPENFILENAME) As Long&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is a routine I've used in the past to use the windows API to browse for a fiel and open it in excel.&amp;nbsp; I added the PTrSafe keyword.&amp;nbsp; Please let me know if it works! &amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'' Adapted from c++ examples: &lt;A target="_blank" href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646928%28v=vs.85%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/ms646928%28v=vs.85%29.aspx&lt;/A&gt;
'' Code to use the windows control to open or save a file using the open file dialog boxes in Microsoft Windows


'' Uncomment one of these two depending if you want to open a file or save a file
''Private Declare PtrSafe Function GetFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (popenfilename As OPENFILENAME) As Long
Private Declare PtrSafe Function GetFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (popenfilename As OPENFILENAME) As Long

Public Const OFN_OVERWRITEPROMPT&amp;amp; = &amp;amp;H2

Private Type OPENFILENAME
    lStructSize As Long
    hwndOwner As Long
    hInstance As Long
    lpstrFilter As String
    lpstrCustomFilter As String
    nMaxCustFilter As Long
    nFilterIndex As Long
    lpstrFile As String
    nMaxFile As Long
    lpstrFileTitle As String
    nMaxFileTitle As Long
    lpstrInitialDir As String
    lpstrTitle As String
    flags As Long
    nFileOffset As Integer
    nFileExtension As Integer
    lpstrDefExt As String
    lCustData As Long
    lpfnHook As Long
    lpTemplateName As String
End Type


Public Function ShowOpen(Filter As String, InitialDir As String, DialogTitle As String, InitialFileName As String) As String
    Dim OFName As OPENFILENAME
    'Set the structure size
    OFName.lStructSize = Len(OFName)
    'Set the owner window
    OFName.hwndOwner = 0
    'Set the filter
    OFName.lpstrFilter = Filter
    'Set the maximum number of chars
    OFName.nMaxFile = 255
    'Create a buffer and set intial file name
    OFName.lpstrFile = Left(InitialFileName &amp;amp; ".PDF" &amp;amp; String(256, 0), 256)
    'Create a buffer
    OFName.lpstrFileTitle = Space$(254)
    'Set the maximum number of chars
    OFName.nMaxFileTitle = 255
    'Set the initial directory
    OFName.lpstrInitialDir = InitialDir
    'Set the dialog title
    OFName.lpstrTitle = DialogTitle
    'no extra flags
    OFName.flags = 0
    'show overwrite file prompt
    OFName.flags = OFN_OVERWRITEPROMPT
    'Show the 'Open File' dialog
    If GetFileName(OFName) Then
        ShowOpen = Trim(OFName.lpstrFile)
    Else
        ShowOpen = ""
    End If
End Function

'' Trims null charectors from a string
Private Function TrimNull(ByVal strItem As String) As String
    Dim intPos As Integer
    intPos = InStr(strItem, vbNullChar)
    If intPos &amp;gt; 0 Then
        TrimNull = Left(strItem, intPos - 1)
        Else
        TrimNull = strItem
    End If
        
End Function


'' Example on how to use

Sub OpenFileExample()
    
    
    '' Open the Save as form through the windows api and allow the designer a chance to
    '' select the save location and filename

    Dim Filter As String
    Filter = "EXCEL FILES (*.XLS)" &amp;amp; Chr$(0) &amp;amp; "*.XLS" &amp;amp; Chr$(0) &amp;amp; _
                "All Files (*.*)" &amp;amp; Chr$(0) &amp;amp; "*.*"
    
    '' Set the directory to begin looking
    Dim InitialDir As String
    InitialDir = CurDir
    
    '' Set the title of the dialog
    Dim DialogTitle As String
    DialogTitle = "Please select a file to open (or to save)"
    
    Dim FileName As String
    FileName = ShowOpen(Filter, InitialDir, DialogTitle, FileName)
    FileName = TrimNull(FileName)
    
    '' Check to make sure user hasn't selected cancel or something else which will cause the
    '' filename to report blank
    If Len(FileName) &amp;lt; 1 Then
        MsgBox ("Something has gone wrong, please try again.")
        Exit Sub
    End If

    '' Open the document in Excel
    Dim oXls As Excel.Application
    Set oXls = CreateObject("Excel.Application")
    oXls.Visible = True
    Dim oWorkBook As Excel.Workbook
    Set oWorkBook = oXls.Workbooks.Open(FileName)
    
    
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 19:56:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365278#M128949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-13T19:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365356#M128950</link>
      <description>&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I am talking about the Folder Browser, Not the File Browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Just adding PtrSafe doesn't work.&lt;/P&gt;&lt;P&gt;There are numerous changes to the 64 bit version of VBA 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Several have to do with new VBA 7 64 bit datatypes or datatype conversions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LongPtr&lt;/P&gt;&lt;P&gt;LongLong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is I do not know when to use the new datatypes or conversions..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not just in the declare statements but in any code that has to pass Window API arguments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With SHBrowseForFolder() &amp;nbsp;there is a lot of callback and messing about with addresses.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2013 20:41:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365356#M128950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-13T20:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365989#M128951</link>
      <description>&lt;P&gt;Sorry Gruff, I didn't read that correctly, and unfortunately my experience with VBA 7 is extremely limitted.&amp;nbsp; I've been trying to get prepared because we'll be updating soon.&amp;nbsp; Wish I could have been more help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 11:51:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4365989#M128951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-14T11:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4367031#M128952</link>
      <description>&lt;P&gt;finally! &amp;nbsp;this works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dang I wish this forum allow me to paste code with indents..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option Explicit&lt;/P&gt;&lt;P&gt;'----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;' 64 bit VBA 7 version of File and Folder Browswers&lt;/P&gt;&lt;P&gt;' FileBrowseOpen()&lt;BR /&gt;' FileBrowseSave()&lt;BR /&gt;' FolderBrowse()&lt;/P&gt;&lt;P&gt;' Much of the original 32 bit module was donated by the good people of XtremeVbTalk.com&lt;BR /&gt;' I massaged it to be 64 bit with VBA 7 code lifted from numerous sites on the web&lt;/P&gt;&lt;P&gt;'----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Private Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias _&lt;BR /&gt;"GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long&lt;BR /&gt;&lt;BR /&gt;Private Declare PtrSafe Function GetSaveFileName Lib "comdlg32.dll" Alias _&lt;BR /&gt;"GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long&lt;BR /&gt;&lt;BR /&gt;Private Declare PtrSafe Function SHBrowseForFolder Lib "shell32.dll" _&lt;BR /&gt;Alias "SHBrowseForFolderA" (lpBrowseInfo As BrowseInfo) As Long&lt;BR /&gt;&lt;BR /&gt;Private Declare PtrSafe Function SHGetPathFromIDList Lib "shell32.dll" _&lt;BR /&gt;(ByVal pidList As LongPtr, ByVal lpBuffer As String) As Long&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Public Declare PtrSafe Function SendMessageA Lib "user32" _&lt;BR /&gt;(ByVal Hwnd As LongPtr, ByVal wMsg As Long, _&lt;BR /&gt;ByVal wParam As LongPtr, lParam As Any) As LongPtr&lt;BR /&gt;&lt;BR /&gt;Private Declare PtrSafe Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As LongPtr)&lt;BR /&gt;&lt;BR /&gt;Private Const BIF_RETURNONLYFSDIRS As Long = 1&lt;BR /&gt;Private Const CSIDL_DRIVES As Long = &amp;amp;H11&lt;BR /&gt;Private Const WM_USER As Long = &amp;amp;H400&lt;BR /&gt;Private Const MAX_PATH As Long = 260&lt;/P&gt;&lt;P&gt;'// message from browser&lt;BR /&gt;Private Const BFFM_INITIALIZED As Long = 1&lt;BR /&gt;Private Const BFFM_SELCHANGED As Long = 2&lt;BR /&gt;Private Const BFFM_VALIDATEFAILEDA As Long = 3 '// lParam:szPath ret:1(cont),0(EndDialog)&lt;BR /&gt;Private Const BFFM_VALIDATEFAILEDW As Long = 4 '// lParam:wzPath ret:1(cont),0(EndDialog)&lt;BR /&gt;Private Const BFFM_IUNKNOWN As Long = 5 '// provides IUnknown to client. lParam: IUnknown*&lt;/P&gt;&lt;P&gt;'// messages to browser&lt;BR /&gt;Private Const BFFM_SETSTATUSTEXTA As Long = WM_USER + 100&lt;BR /&gt;Private Const BFFM_ENABLEOK As Long = WM_USER + 101&lt;BR /&gt;Private Const BFFM_SETSELECTIONA As Long = WM_USER + 102&lt;BR /&gt;Private Const BFFM_SETSELECTIONW As Long = WM_USER + 103&lt;BR /&gt;Private Const BFFM_SETSTATUSTEXTW As Long = WM_USER + 104&lt;BR /&gt;Private Const BFFM_SETOKTEXT As Long = WM_USER + 105 '// Unicode only&lt;BR /&gt;Private Const BFFM_SETEXPANDED As Long = WM_USER + 106 '// Unicode only&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Private Type OPENFILENAME&lt;BR /&gt;lStructSize As Long&lt;BR /&gt;hWndOwner As LongPtr&lt;BR /&gt;hInstance As LongPtr&lt;BR /&gt;lpstrFilter As String&lt;BR /&gt;lpstrCustomFilter As String&lt;BR /&gt;nMaxCustFilter As Long&lt;BR /&gt;nFilterIndex As Long&lt;BR /&gt;lpstrFile As String&lt;BR /&gt;nMaxFile As Long&lt;BR /&gt;lpstrFileTitle As String&lt;BR /&gt;nMaxFileTitle As Long&lt;BR /&gt;lpstrInitialDir As String&lt;BR /&gt;lpstrTitle As String&lt;BR /&gt;flags As Long&lt;BR /&gt;nFileOffset As Integer&lt;BR /&gt;nFileExtension As Integer&lt;BR /&gt;lpstrDefExt As String&lt;BR /&gt;lCustData As Long&lt;BR /&gt;lpfnHook As LongPtr&lt;BR /&gt;lpTemplateName As String&lt;BR /&gt;End Type&lt;/P&gt;&lt;P&gt;Public Type BrowseInfo&lt;BR /&gt;hWndOwner As LongPtr&lt;BR /&gt;pIDLRoot As LongPtr&lt;BR /&gt;pszDisplayName As String&lt;BR /&gt;lpszTitle As String&lt;BR /&gt;ulFlags As Long&lt;BR /&gt;lpfnCallback As LongPtr&lt;BR /&gt;lParam As LongPtr&lt;BR /&gt;iImage As Long&lt;BR /&gt;End Type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'====== File Browsers for 64 bit VBA 7 ========&lt;/P&gt;&lt;P&gt;Public Function FileBrowseOpen(ByVal sInitFolder As String, _&lt;BR /&gt;ByVal sTitle As String, _&lt;BR /&gt;ByVal sFilter As String, _&lt;BR /&gt;ByVal nFilterIndex As Integer) As String&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dim OpenFile As OPENFILENAME&lt;BR /&gt;Dim lReturn As Long&lt;BR /&gt;&lt;BR /&gt;sInitFolder = CorrectPath(sInitFolder)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OpenFile.lpstrInitialDir = sInitFolder&lt;BR /&gt;&lt;BR /&gt;' Swap filter separator for api separator&lt;BR /&gt;sFilter = Replace(sFilter, "|", Chr(0))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OpenFile.lpstrFilter = sFilter&lt;BR /&gt;OpenFile.nFilterIndex = nFilterIndex&lt;BR /&gt;OpenFile.lpstrTitle = sTitle&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OpenFile.hWndOwner = 0&lt;BR /&gt;OpenFile.lpstrFile = String(257, 0)&lt;/P&gt;&lt;P&gt;OpenFile.nMaxFile = LenB(OpenFile.lpstrFile) - 1&lt;BR /&gt;OpenFile.lStructSize = LenB(OpenFile)&lt;BR /&gt;&lt;BR /&gt;OpenFile.lpstrFileTitle = OpenFile.lpstrFile&lt;BR /&gt;OpenFile.nMaxFileTitle = OpenFile.nMaxFile&lt;BR /&gt;&lt;BR /&gt;OpenFile.flags = 0&lt;BR /&gt;&lt;BR /&gt;lReturn = GetOpenFileName(OpenFile)&lt;BR /&gt;&lt;BR /&gt;If lReturn = 0 Then&lt;BR /&gt;FileBrowseOpen = ""&lt;BR /&gt;Else&lt;BR /&gt;FileBrowseOpen = Trim(Left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) - 1))&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;Public Function FileBrowseSave(ByVal sDefaultFilename As String, _&lt;BR /&gt;ByVal sInitFolder As String, _&lt;BR /&gt;ByVal sTitle As String, _&lt;BR /&gt;ByVal sFilter As String, _&lt;BR /&gt;ByVal nFilterIndex As Integer) As String&lt;/P&gt;&lt;P&gt;Dim PadCount As Integer&lt;BR /&gt;Dim OpenFile As OPENFILENAME&lt;BR /&gt;Dim lReturn As Long&lt;BR /&gt;&lt;BR /&gt;sInitFolder = CorrectPath(sInitFolder)&lt;BR /&gt;&lt;BR /&gt;' Swap filter separator for api separator&lt;BR /&gt;sFilter = Replace(sFilter, "|", Chr(0))&lt;BR /&gt;&lt;BR /&gt;OpenFile.lpstrFilter = sFilter&lt;BR /&gt;OpenFile.nFilterIndex = 1&lt;BR /&gt;OpenFile.hWndOwner = 0&lt;BR /&gt;&lt;BR /&gt;PadCount = 260 - Len(sDefaultFilename)&lt;BR /&gt;OpenFile.lpstrFile = sDefaultFilename &amp;amp; String(PadCount, Chr(0))&lt;BR /&gt;'OpenFile.lpstrFile = String(257, 0)&lt;/P&gt;&lt;P&gt;OpenFile.nMaxFile = LenB(OpenFile.lpstrFile) - 1&lt;BR /&gt;OpenFile.lStructSize = LenB(OpenFile)&lt;BR /&gt;&lt;BR /&gt;OpenFile.lpstrFileTitle = OpenFile.lpstrFile&lt;BR /&gt;OpenFile.nMaxFileTitle = OpenFile.nMaxFile&lt;BR /&gt;OpenFile.lpstrInitialDir = sInitFolder&lt;BR /&gt;OpenFile.lpstrTitle = sTitle&lt;BR /&gt;OpenFile.flags = 0&lt;BR /&gt;lReturn = GetSaveFileName(OpenFile)&lt;BR /&gt;&lt;BR /&gt;If lReturn = 0 Then&lt;BR /&gt;FileBrowseSave = ""&lt;BR /&gt;Else&lt;BR /&gt;FileBrowseSave = Trim(Left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) - 1))&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;'====== Folder Browser for 64 bit VBA 7 ========&lt;/P&gt;&lt;P&gt;Public Function FolderBrowse(ByVal sDialogTitle As String, ByVal sInitFolder As String) As String&lt;BR /&gt;Dim ReturnPath As String&lt;BR /&gt;&lt;BR /&gt;Dim b(MAX_PATH) As Byte&lt;BR /&gt;Dim pItem As Long&lt;BR /&gt;Dim sFullPath As String&lt;BR /&gt;Dim bi As BrowseInfo&lt;BR /&gt;Dim ppidl As Long&lt;BR /&gt;&lt;BR /&gt;sInitFolder = CorrectPath(sInitFolder)&lt;BR /&gt;&lt;BR /&gt;' Note VBA windows and dialogs do not have an hWnd property.&lt;BR /&gt;bi.hWndOwner = 0 'Windows Main Screen handle.&lt;BR /&gt;&lt;BR /&gt;' SHGetSpecialFolderLocation bi.hWndOwner, CSIDL_DRIVES, ppidl&lt;BR /&gt;&lt;BR /&gt;bi.pIDLRoot = 0 'ppidl&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;bi.pszDisplayName = VarPtr(b(0))&lt;BR /&gt;bi.lpszTitle = sDialogTitle&lt;BR /&gt;bi.ulFlags = BIF_RETURNONLYFSDIRS&lt;BR /&gt;If FolderExists(sInitFolder) Then bi.lpfnCallback = PtrToFunction(AddressOf BFFCallback)&lt;BR /&gt;bi.lParam = StrPtr(sInitFolder)&lt;/P&gt;&lt;P&gt;pItem = SHBrowseForFolder(bi)&lt;BR /&gt;&lt;BR /&gt;If pItem Then ' Succeeded&lt;BR /&gt;sFullPath = Space$(MAX_PATH)&lt;BR /&gt;If SHGetPathFromIDList(pItem, sFullPath) Then&lt;BR /&gt;ReturnPath = Left$(sFullPath, InStr(sFullPath, vbNullChar) - 1) ' Strip nulls&lt;BR /&gt;CoTaskMemFree pItem&lt;BR /&gt;End If&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;If ReturnPath &amp;lt;&amp;gt; "" Then&lt;BR /&gt;If Right$(ReturnPath, 1) &amp;lt;&amp;gt; "\" Then&lt;BR /&gt;ReturnPath = ReturnPath &amp;amp; "\"&lt;BR /&gt;End If&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;FolderBrowse = ReturnPath&lt;BR /&gt;&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;' typedef int (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);&lt;BR /&gt;Private Function BFFCallback(ByVal Hwnd As LongPtr, ByVal uMsg As LongPtr, ByVal lParam As LongPtr, ByVal sData As String) As LongPtr&lt;BR /&gt;If uMsg = BFFM_INITIALIZED Then&lt;BR /&gt;SendMessageA Hwnd, BFFM_SETSELECTIONA, True, ByVal sData&lt;BR /&gt;End If&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;Private Function PtrToFunction(ByVal lFcnPtr As LongPtr) As LongPtr&lt;BR /&gt;PtrToFunction = lFcnPtr&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;Private Function CorrectPath(ByVal sPath As String) As String&lt;BR /&gt;If Right$(sPath, 1) = "\" Then&lt;BR /&gt;If Len(sPath) &amp;gt; 3 Then sPath = Left$(sPath, Len(sPath) - 1) ' Strip backslash from non-root&lt;BR /&gt;Else&lt;BR /&gt;If Len(sPath) = 2 Then sPath = sPath &amp;amp; "\" ' Append backslash to root&lt;BR /&gt;End If&lt;BR /&gt;CorrectPath = sPath&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Public Function FolderExists(ByVal sFolderName As String) As Boolean&lt;BR /&gt;Dim att As Long&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;att = GetAttr(sFolderName)&lt;BR /&gt;If Err.Number = 0 Then&lt;BR /&gt;FolderExists = True&lt;BR /&gt;Else&lt;BR /&gt;Err.Clear&lt;BR /&gt;FolderExists = False&lt;BR /&gt;End If&lt;BR /&gt;On Error GoTo 0&lt;BR /&gt;End Function&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 00:28:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4367031#M128952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-15T00:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4367445#M128953</link>
      <description>&lt;P&gt;Thanks awesome.&amp;nbsp; Thanks for sharing the final result.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 11:15:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4367445#M128953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-15T11:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4419581#M128954</link>
      <description>&lt;P&gt;Found the Flag values for the Folder Browser.&lt;/P&gt;&lt;P&gt;The following shows which flags to use for enabling a "Make Directory" button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' == Folder Browser flags ==&lt;BR /&gt;Private Const BIF_RETURNONLYFSDIRS As Long = &amp;amp;H1&lt;BR /&gt;Private Const BIF_DONTGOBELOWDOMAIN As Long = &amp;amp;H2&lt;BR /&gt;Private Const BIF_STATUSTEXT As Long = &amp;amp;H4&lt;BR /&gt;Private Const BIF_RETURNFSANCESTORS As Long = &amp;amp;H8&lt;BR /&gt;Private Const BIF_EDITBOX As Long = &amp;amp;H10&lt;BR /&gt;Private Const BIF_VALIDATE As Long = &amp;amp;H20&lt;BR /&gt;Private Const BIF_NEWDIALOGSTYLE As Long = &amp;amp;H40&lt;BR /&gt;Private Const BIF_BROWSEINCLUDEURLS As Long = &amp;amp;H80&lt;BR /&gt;Private Const BIF_USENEWUI As Long = (BIF_EDITBOX Or BIF_NEWDIALOGSTYLE)&lt;BR /&gt;Private Const BIF_UAHINT As Long = &amp;amp;H100&lt;BR /&gt;Private Const BIF_NONEWFOLDERBUTTON As Long = &amp;amp;H200&lt;BR /&gt;Private Const BIF_NOTRANSLATETARGETS As Long = &amp;amp;H400&lt;BR /&gt;Private Const BIF_BROWSEFORCOMPUTER As Long = &amp;amp;H1000&lt;BR /&gt;Private Const BIF_BROWSEFORPRINTER As Long = &amp;amp;H2000&lt;BR /&gt;Private Const BIF_BROWSEINCLUDEFILES As Long = &amp;amp;H4000&lt;BR /&gt;Private Const BIF_SHAREABLE As Long = &amp;amp;H8000&lt;BR /&gt;Private Const BIF_BROWSEFILEJUNCTIONS As Long = &amp;amp;H10000&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px;"&gt;'...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;bi.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_USENEWUI &amp;nbsp;'&amp;lt;-- Show Make Directory button.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2013 21:01:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4419581#M128954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-11T21:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4860690#M128955</link>
      <description>&lt;P&gt;Gruff,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Long shot, but it never hurts to ask.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've "repurposed" your VBA code for an Excel VBA program. Seems to be working...but I'm getting an error when compiling, and there seem to be some memory leaks with the spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error-----&lt;/P&gt;&lt;P&gt;Compile error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invalid use of AddressOf operator&lt;/P&gt;&lt;P&gt;Error-----&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line in bold is where the compile message originates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; 
'====== Folder Browser for 64 bit VBA 7 ========
Public Function FolderBrowse(ByVal sDialogTitle As String, ByVal sInitFolder As String) As String
Dim ReturnPath As String

Dim b(MAX_PATH) As Byte
Dim pItem As Long
Dim sFullPath As String
Dim bi As BrowseInfo
Dim ppidl As Long

sInitFolder = CorrectPath(sInitFolder)

' Note VBA windows and dialogs do not have an hWnd property.
bi.hWndOwner = 0 'Windows Main Screen handle.

' SHGetSpecialFolderLocation bi.hWndOwner, CSIDL_DRIVES, ppidl

bi.pIDLRoot = 0 'ppidl

bi.pszDisplayName = VarPtr(b(0))
bi.lpszTitle = sDialogTitle
bi.ulFlags = BIF_RETURNONLYFSDIRS
&lt;STRONG&gt;If FolderExists(sInitFolder) Then bi.lpfnCallback = PtrToFunction(AddressOf BFFCallback)&lt;/STRONG&gt;
bi.lParam = StrPtr(sInitFolder)
pItem = SHBrowseForFolder(bi)

If pItem Then ' Succeeded
sFullPath = Space$(MAX_PATH)
If SHGetPathFromIDList(pItem, sFullPath) Then
ReturnPath = Left$(sFullPath, InStr(sFullPath, vbNullChar) - 1) ' Strip nulls
CoTaskMemFree pItem
End If
End If

If ReturnPath &amp;lt;&amp;gt; "" Then
If Right$(ReturnPath, 1) &amp;lt;&amp;gt; "\" Then
ReturnPath = ReturnPath &amp;amp; "\"
End If
End If

FolderBrowse = ReturnPath

End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 14:39:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4860690#M128955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-06T14:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4861086#M128956</link>
      <description>&lt;P&gt;What verson of Excel are you using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was under the impression that the Excel API had File and Folder Browsing tools built in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you sure you have 64 bit Excel installed? &amp;nbsp;Office 2010-2012 defaults to 32 bit on install regardless of the processer.&lt;/P&gt;&lt;P&gt;You have to manually run the 64 bit install from a sub folder on the install disk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your running 32 bit VBA then my posted code will fail.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 16:40:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4861086#M128956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-06T16:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4861114#M128957</link>
      <description>&lt;P&gt;Gruff,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently using&amp;nbsp;&lt;SPAN&gt;Excel 2010 (32 bit, now, but it was 64 bit when I started the Excel Program). &amp;nbsp;Excel probably does have the built-in browsing, but I'm learning as I go...so I of course took the most difficult path.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm actually saving an Autocad Drawing that I create with Excel VBA (writing Excel data to a custom table in a new drawing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 16:42:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4861114#M128957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-06T16:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4900828#M128958</link>
      <description>&lt;P&gt;Finally ended up using the built-in file browser in AutoCAD - works great and it's less code!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for pointing me in the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2014 12:17:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/4900828#M128958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-21T12:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5209017#M128959</link>
      <description>&lt;P&gt;Can you provide me your code for using built-in file broweser in AutoCAD ?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 13:05:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5209017#M128959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-12T13:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5209115#M128960</link>
      <description>&lt;P&gt;The below VBA code is from Excel, and is simply saving the AutoCAD file using the Excel built-in file browswer, most of the code is error checking to make sure the path and file name are valid, the usual issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a Function to open and save...most likely kludgey, but it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Function GetFileName(FilePath As String, FileTitle As String, OpenFile As Boolean) As Variant

' Save newly created AutoCAD file

Dim strFileFilter As String
Dim strFileName As String
Dim Title As String
Dim tempFileName As Variant

Title = FileTitle
strFileFilter = "DWG (AutoCAD drawing) (*.dwg),*.dwg"

' Make sure the default path is the workbook path
ChDrive ThisWorkbook.path
ChDir ThisWorkbook.path

If OpenFile Then
    tempFileName = Application.GetOpenFileName(strFileFilter, , "Select File to Open", , False)
Else
    tempFileName = Application.GetSaveAsFilename("SAVE FILE", strFileFilter, , Title)
End If

GetFileName = tempFileName ' If tempFileName = FALSE then exit parent sub...

End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 13:37:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5209115#M128960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-12T13:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5212349#M128961</link>
      <description>&lt;P&gt;The code workd in excel but not in AutoCAD VBA.&lt;/P&gt;&lt;P&gt;Any reason? modification needed to make it working in AutoCAD VBA. I am using AutoCAD 2014.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 17:17:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5212349#M128961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-13T17:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5213011#M128962</link>
      <description>&lt;P&gt;As this is an Inventor forum, we are straying a bit off topic. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That being said, I've never actually tried to use the Open file dialog in AutoCAD using VBA. &amp;nbsp;Seems like I've always pushing information from Excel into an AutoCAD drawing. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link below has a pretty good explanation on how to get a File Dialog system working with AutoCAD and VBA, a bit dated, and you might have some problems with 64bit AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://forums.autodesk.com/t5/Visual-Basic-Customization/VBA-Open-File-with-Dialog-Box/td-p/1726554"&gt;https://forums.autodesk.com/t5/Visual-Basic-Customization/VBA-Open-File-with-Dialog-Box/td-p/1726554&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A target="_blank" href="http://vbnet.mvps.org/code/comdlg/fileopendlg.htm"&gt;http://vbnet.mvps.org/code/comdlg/fileopendlg.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To update&amp;nbsp;the method above, check out the&amp;nbsp;&lt;/SPAN&gt;theswamp.org. &amp;nbsp;The forums on theswamp.org &amp;nbsp;are an excellent resource for AutoCAD programming and somebody recently posted and updated module to be used with 64 bit VBA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://www.theswamp.org/index.php?topic=47580.0"&gt;http://www.theswamp.org/index.php?topic=47580.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, here's an alternative approach using VBA and LISP...and it seems like the simplest approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2013/03/selecting-file-with-standard-autocad-fileopen-dialog.html"&gt;http://adndevblog.typepad.com/autocad/2013/03/selecting-file-with-standard-autocad-fileopen-dialog.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 22:25:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5213011#M128962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-13T22:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5220021#M128963</link>
      <description>&lt;P&gt;Thank you very much. How does one get the file browser portion to return a multiple file section?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2014 18:29:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5220021#M128963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T18:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5231797#M128964</link>
      <description>&lt;P&gt;I've not yet tried out the code linked below...but they do discuss multiple file selections.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/visual-basic-customization/vba-7-1-commondialog-lost/td-p/3841702" target="_blank"&gt;http://forums.autodesk.com/t5/visual-basic-customization/vba-7-1-commondialog-lost/td-p/3841702&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to try and get the code above working in an example DVB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2014 12:53:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5231797#M128964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-25T12:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5602425#M128965</link>
      <description>&lt;P&gt;Hello,Could you please help me , in this code i am trying to open a save dialog box to save a file, but i am not able to open.&lt;/P&gt;&lt;P&gt;i tried it on OFFICE 10 (64 bit).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Function MSA_GetSaveFileName(msaof As MSA_OPENFILENAME) As Integer&lt;BR /&gt;' Opens the file save dialog.&lt;BR /&gt;&lt;BR /&gt;Dim of As OPENFILENAME&lt;BR /&gt;Dim intRet As Integer&lt;BR /&gt;Dim strPath As String&lt;/P&gt;&lt;P&gt;'Const OFN_ALLOWMULTISELECT = &amp;amp;H200&lt;BR /&gt;'Const OFN_CREATEPROMPT = &amp;amp;H2000&lt;BR /&gt;'Const OFN_EXPLORER = &amp;amp;H80000&lt;BR /&gt;'Const OFN_FILEMUSTEXIST = &amp;amp;H1000&lt;BR /&gt;'Const OFN_HIDEREADONLY = &amp;amp;H4&lt;BR /&gt;'Const OFN_NOCHANGEDIR = &amp;amp;H8&lt;BR /&gt;'Const OFN_NODEREFERENCELINKS = &amp;amp;H100000&lt;BR /&gt;'Const OFN_NONETWORKBUTTON = &amp;amp;H20000&lt;BR /&gt;'Const OFN_NOREADONLYRETURN = &amp;amp;H8000&lt;BR /&gt;'Const OFN_NOVALIDATE = &amp;amp;H100&lt;BR /&gt;'Const OFN_OVERWRITEPROMPT = &amp;amp;H2&lt;BR /&gt;'Const OFN_PATHMUSTEXIST = &amp;amp;H800&lt;BR /&gt;'Const OFN_READONLY = &amp;amp;H1&lt;BR /&gt;'Const OFN_SHOWHELP = &amp;amp;H10&lt;BR /&gt;&lt;BR /&gt;MSAOF_to_OF msaof, of&lt;BR /&gt;of.Flags = 0 '2 ^ 3 Or 2 ^ 9&lt;BR /&gt;of.Flags = of.Flags Or OFN_HIDEREADONLY&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;intRet = GetSaveFileName(of)&lt;/FONT&gt;&lt;BR /&gt;If intRet Then&lt;BR /&gt;OF_to_MSAOF of, msaof&lt;BR /&gt;strPath = _&lt;BR /&gt;Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1)&lt;BR /&gt;End If&lt;BR /&gt;MSA_GetSaveFileName = intRet&lt;BR /&gt;End Function&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 06:40:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5602425#M128965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-22T06:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5603227#M128966</link>
      <description>Sorry, I am not sure what I am seeing regarding the code you posted.&lt;BR /&gt;I am not well versed in the topic.&lt;BR /&gt;--&lt;BR /&gt;Tom Groff&lt;BR /&gt;Software Engineering / IT&lt;BR /&gt;Pacific Stainless Products Inc.&lt;BR /&gt;&lt;BR /&gt;Direct: 503-366-8274&lt;BR /&gt;Ext: 274</description>
      <pubDate>Wed, 22 Apr 2015 15:23:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5603227#M128966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-22T15:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Folder Browser Needed for VBA 7 64 bit.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5963080#M128967</link>
      <description>&lt;P&gt;Hey Gruff, How can I translate this function to VB7.1 64bit&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Private Function getRawFname(frm As Object, ByVal gsi As Boolean) As String
   If gsi Then
      frm.cmdFD.Filter = "Raw Data (*.raw)|*.raw"
   Else
      frm.cmdFD.Filter = "Comma Delimited (*.cdd)|*.cdd"
   End If
   frm.cmdFD.FilterIndex = 1
   frm.cmdFD.ShowOpen
   getRawFname = frm.cmdFD.FileName
End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Been struggling for weeks now. cmdFD is a common dialog box.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 09:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/folder-browser-needed-for-vba-7-64-bit/m-p/5963080#M128967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-23T09:12:30Z</dc:date>
    </item>
  </channel>
</rss>

