Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2008, 03:12 AM
Authorized User
 
Join Date: Apr 2007
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default User-Defined Type Error - Re: File Dialog

For some reason when I am attempting to declare a variable as FileDialog I am getting an error: "Compile Error: User-Defined Type Not Defined"

Anyone familiar with this situation?
Thanks in advance for any help you could lend.



This is my code:
Sub MapDataDb()
    Dim UsFile As Variant
    Dim UsItem As String
    Dim UrAdd As Variant
    Dim UrName As Variant
    Dim CheckUeFam As Variant
    Dim fd As FileDialog



BrwsNew:

Access.FileDialog(msoFileDialogFilePicker).Show

 
Old January 16th, 2008, 09:42 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It looks like a missing reference error. From the VBA Editor, Tools > References > Microsoft Access 11.0 Object Library and Microsoft ActiveX Data Objects 2.1 Library. I think that will do it.

Did that help?

mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
Setting variable to user defined type mantle51 SQL Server 2000 3 August 10th, 2007 03:52 AM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
Using a user defined type and the Split Function nikotromus Access VBA 2 August 20th, 2004 12:02 PM
Table and User Defined Type with same Name djuricd SQL Server 2000 3 April 20th, 2004 12:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.