View Single Post
 
Old 10-03-2017, 06:10 PM
jeddell jeddell is offline Windows 10 Office 2016
Novice
 
Join Date: Oct 2017
Posts: 3
jeddell is on a distinguished road
Default

Thanks for your reply.
Here is the code for the OPENFILENAME.
Code:
Public 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
I must admit this is a little beyond me and I like your code better. I am getting an error 5 though. Ran the debug and it stopped at

Code:
fd.Filters.Add "Files", strFilter, 1
I'm guessing this could just be a typo. I did try to add the file extension there instead of the '1' but it did not help. Id be happy to continue working with your code if that's OK would certainly help and Lessen my learning curve. It certainly looks a lot simpler.
Reply With Quote