[AccessD] What's wrong with this?

Arthur Fuller fuller.artful at gmail.com
Mon May 28 19:19:13 CDT 2012


I'm looking at an InsideAccess article on MSDN that's about FileOpen and
FileSaveAs. It's got some wonky spacing and punctuation, that I've tried to
clean up, but so far unsuccessfully.

Here's what I have so far, and it won't permit it. I'm hoping someone can
either tell me what's wrong or maybe has this code in a form that is
considered acceptable. This is in a class module called CommonDialogAPI:
One thing that strikes me as odd is the lack of commas between items, but
maybe that's just the TYPE syntax. I don't know.

<vba>
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
</vba>

Can you help? TIA.
-- 
Arthur
Cell: 647.710.1314

Prediction is difficult, especially of the future.
  -- Niels Bohr


More information about the AccessD mailing list