Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBE in Access 97 (Access 97)

    The code below, or equivalent, works in Access 2000, Access 2002 and Access 2003, but not in Access 97.
    A Reference to the VBA for Extensibility library is included.

    Is there a fix?
    <pre>Option Compare Database
    Option Explicit

    Private Sub test()
    Const strProject As String = "HKNewProject"
    Dim appAccess As Access.Application
    Dim strPath As String

    strPath = strProject & ".mdb"
    If Len(Dir(strPath)) <> 0 Then
    On Error Resume Next
    Kill strPath
    On Error GoTo 0
    End If
    Set appAccess = New Access.Application
    With appAccess
    .NewCurrentDatabase strPath
    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''
    ' The following does not compile in Access 97
    Debug.Print .VBE.VBProjects.Count
    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''
    .Quit
    End With
    Set appAccess = Nothing
    End Sub
    </pre>


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBE in Access 97 (Access 97)

    Access 97 did not use the standard Visual Basic Editor, and there is no direct equivalent to VBE.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBE in Access 97 (Access 97)

    thanx, so there's no way to get a project object and work down from there.
    tis pity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •