I copied all of this code and tried it, but I get a Compile error:
User-defined type not defined on:
Dim OFN As tagOPENFILENAME
....even though I copied the Type def, as follows:
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
This is in a real module, not a class module. I'm running Access and VB
installed with Office 2007 Enterprise. Any thoughts?