PDA

View Full Version : Solved: VBE in Access 97



Howard Kaikow
04-29-2005, 05:48 AM
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

OBP
04-30-2005, 09:40 AM
What is it you want to do in Access 97?
There is a lot that is not supported in 97b that is supported in the later versions.

Howard Kaikow
04-30-2005, 10:15 AM
What is it you want to do in Access 97?
There is a lot that is not supported in 97b that is supported in the later versions.

i was trying get a vbproject object.
apparently cannot be done in Access 97.

See http://www.standards.com/index.html?SetVBAProjectPassword

OBP
04-30-2005, 10:50 AM
Looking at your work, you are the one who should be helping on here.

MOS MASTER
04-30-2005, 12:05 PM
Looking at your work, you are the one who should be helping on here.
Howard is used to solving his own questions! :rofl: (and is more a BUG buster)

Howard Kaikow
04-30-2005, 01:44 PM
Howard is used to solving his own questions! :rofl: (and is more a BUG buster)

Quite often the mere act of posting a question can cause me to see something I had not thought about before.

Hmm, maybe I should first write up the question and email it to myself?

MOS MASTER
04-30-2005, 01:56 PM
Quite often the mere act of posting a question can cause me to see something I had not thought about before.

Hmm, maybe I should first write up the question and email it to myself?
Hahaha yeah that's a good one, you do that! :rofl:

But I know the fealing when you're banging you're head on the wall finding a sollution. Al it ussualy takes is to stop thinking about if for a while (doing something else) and then the sollution will come to you. (most of the times) :whistle: