Missing functions from VBA

mor

Registered User.
Local time
Today, 20:11
Joined
Jun 28, 2013
Messages
56
Hi all,

I have been developing some new features for an access data base that my company uses. I have been creating these new functions with VBA in a database that I have made by myself.

Having created them and now wanting to transfer the VBA code over to the new Access file, it appears that some of the functions don't exist. For example, the Application.FileDialog(....) does not exist when I copy over to the new database. I have read on some forums that I need to add a reference from Tools|References, but all the references used in my access database are already added in the other database.

Anyone know this application is available in my DB but not in the other?

Thanks,
MOR
 
Are you sure tou have "Microsoft Scripting Runtime" reference ticked?

Use this code to compare references between the two,
Code:
Public Sub listAllReference()
[COLOR=Green]'Code Courtesy of
'  Paul Eugin[/COLOR]
    Dim ctrVar As Long
    For ctrVar = 1 To Application.VBE.ActiveVBProject.References.Count
        Debug.Print Application.VBE.ActiveVBProject.References(ctrVar).Description
    Next
End Sub
 
I have had almost the same issue at a time.
Because I have the FULL installation for my MS Office and the user have the DEFAULT one some of my routines have stopped to work.
 
I still get a compilation error even if I add the "Microsoft Scripting Runtime".

"Type defined by user not defined."

Code:
Dim fd As FileDialog
 
Okay could you paste the result of running the above code here?
 
My references:

Visual Basic For Applications
Microsoft Access 14.0 Object Library
OLE Automation
Microsoft Office 14.0 Access database engine Object Library
Microsoft Office 14.0 Object Library


Company references:
Visual Basic For Applications
Microsoft Access 14.0 Object Library
OLE Automation
Microsoft Office 14.0 Access database engine Object Library
Microsoft Internet Controls
Microsoft Outlook 14.0 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security
Microsoft ActiveX Data Objects 2.7 Library
Microsoft Excel 14.0 Object Library
Microsoft Shell Controls And Automation
Microsoft Scripting Runtime
 
Add Microsoft Office X.X Object Library to the Company reference (where X.X represents the version number)... FileDialog is a method in that library..
 

Users who are viewing this thread

Back
Top Bottom