VBE in Access 97

H

Howard Kaikow

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?

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
 
D

Douglas J. Steele

Access 97 doesn't use VBA for Extensibility. It predates the use of the
separate VBE environment, therefore I doubt very much that you can do
anything about it.
 
H

Howard Kaikow

Douglas J. Steele said:
Access 97 doesn't use VBA for Extensibility. It predates the use of the
separate VBE environment, therefore I doubt very much that you can do
anything about it.

Ayup, nothing I can do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top