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.