PDA

View Full Version : [SLEEPER:] Dim aem??



colegwu13
08-05-2024, 09:08 AM
Forum,

I'm getting a 'Compile error: User-defined type not defined' when attempting to run a macro. The 'Dim aem As Map' and followed by:

Create the analysis element map
Set aem = createAnalysisElementMap

This line is where the compile error occurs
Function createAnalysisElementMap(outlineLvl As Long) As Map

Should I define the Dim aem something other than map? Or could this be a reference issue? I can attach the module - wanted to ask first.

Cheers,
Cole

barnie
08-06-2024, 11:54 AM
Make sure that the necessary references for the Map object are included in your VBA environment. Go to the VBA editor (press Alt + F11), then choose Tools > References and look for any missing references. If Map is part of a library, this library must be properly referenced.

colegwu13
08-08-2024, 01:39 PM
Thanks. I did look there. How would Map be refenced in the library? I tried few options. I appreciate your help.:clap: