PDA

View Full Version : User-Defined Type Not Defined Error



jason52388
06-26-2014, 04:12 PM
I have an error that keeps popping up when I am not running any macros. I've finally be able to reproduce it consistently. Any time I have the visual basic editor open, I type some code in the editor, then go back to the excel sheet, type something in a cell and hit enter.... I get an error that says User-Defined Type Not Defined. I've tried compiling and it does not bring up the error. Any ideas on what could be causing this?

Jason

Jan Karel Pieterse
06-26-2014, 09:20 PM
Is it a runtime error or a compile error? The error message shows either of the two?

snb
06-27-2014, 02:48 AM
You are the only one who is causing this; so why not showing us the 'code' you entered in the worksheet codemodule ?

jason52388
06-27-2014, 07:43 AM
Is it a runtime error or a compile error? The error message shows either of the two?

I honestly don't think it's either although I had to look up the definition of run-time. The error does not occur when I compile and it also does not occur when I'm running any code. I checked the code on all the worksheets and I didn't put anything in for the on worksheet_change sub. This error hasn't seemed to cause any problems other than popping up quite often but I would still like to get to the bottom of it.

jason52388
06-27-2014, 07:45 AM
You are the only one who is causing this; so why not showing us the 'code' you entered in the worksheet codemodule ?

I had already checked the worksheet codemodule to remove anything I had in them. I don't have any code to show you've because I've deleted it all but I still get the error. I have plenty of other code in modules but I wouldn't know what would be related and what would not.

snb
06-27-2014, 08:11 AM
Nor would I.

Kenneth Hobs
06-27-2014, 11:08 AM
In the VBE, did you check for all valid references in Tools > References?

Jan Karel Pieterse
06-28-2014, 07:11 AM
I honestly don't think it's either although I had to look up the definition of run-time. The error does not occur when I compile and it also does not occur when I'm running any code.

You only need to look at the error message to see whether it is a runtime or a compile error, the messagebox itself states either one.

Paul_Hossler
06-28-2014, 07:51 AM
1. If you have any addins loaded, disable all the add ins and see if it still happens

If it goes away, then test by loading in the addins one at a time to narrow it down


2. Is it every workbook or just a particular one?


3. Is it every sheet in the workbook(s) or just a particular one?

jason52388
11-25-2014, 12:32 PM
I have an error that keeps popping up when I am not running any macros. I've finally be able to reproduce it consistently. Any time I have the visual basic editor open, I type some code in the editor, then go back to the excel sheet, type something in a cell and hit enter.... I get an error that says User-Defined Type Not Defined. I've tried compiling and it does not bring up the error. Any ideas on what could be causing this?

Jason


Finally found the answer to my problem. I figured out that I had a button linking to a macro that no longer existed. This button was sitting underneath an exact copy of the same button that was correctly mapped to a macro so it was hard to find.

Jason