Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default User Defined Type not Defined error

You get that error when you attempt to declare a variable of a data type
that is not defined to VBA. It might be as simple as a misspelling. E.g.,

Dim N As intger ' Note misspelling of 'Integer'

Or it might be due to a reference that should be referenced that isn't
reference, or that a type library is missing.

In VBA, go to the Tools menu and choose References. See if any of the
checked items are marked "MISSING". If this is the case, you have two
choice. Uncheck the reference item, click the Browse button, and navigate to
the actual location of the type library (it may be a *.exe, *.dll, *.ocx, or
*.tlb file). The other way to go it to cause Excel to re-register itself
with Windows, which will clear up reference problems with standard type
libraries but not necessarily with user-created libraries.

Close Excel (and any other Office program like Word or Outlook), then go to
the Windows Start menu, choose Run and enter the following and click OK

Excel.exe /unreserver

The repeat with

Excel.exe /regserver

This will cause Excel to start, rewrite all of its settings, libraries, and
references back to "factory defaults", and then quit.

Now, start Excel normally and see if the problem is still there. If so, post
the line of code that is causing the problem.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"slreilly" wrote in message
...
Every time I edit a cell I get an error message that says "User-defined
type
not defined". I am not so familiar with VBA, but I know this has something
to
do with it. Can anyone please tell me how to get rid of this?? There's no
code or macro in this workbook...

thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"User-defined type not defined" error when trying to send e-mail SupperDuck Excel Programming 9 August 2nd 06 07:36 AM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Workspace faux user-defined type not defined Chris S[_2_] Excel Programming 3 November 11th 04 05:51 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


All times are GMT +1. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"