News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Compile Error: User not not defined. Macro is not working in Visio 2013

Started by oceangoing, August 16, 2016, 12:10:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oceangoing

Hi All,
Much appreciated if you can help me to solve this problem.

I have some macros working Visio 2010 are fine. Recently, we decide to move our Visio 2010 to Visio 2013. I have tried many methods to clean up but still have the following macros can not be recoganized.
For example, the following macro is still showing me "Compile Error: User-defined type is not defined". I have tried all possible libry like, DAO 3.6, ActiveX Data 6.1 object library and so on.
Function vbCompExists(objVBProject As VBIDE.VBProject, strCompName As Variant)
    vbCompExists = 0
    For x = 1 To objVBProject.VBComponents.count
        If objVBProject.VBComponents.Item(x).name = strCompName Then
            vbCompExists = x
            Exit Function
        End If
    Next
End Function
The Visio 2013 is still not working with Macros.

Please help!!!


AndyW

You just need to add the reference

'Microsoft Visual Basic for Applications Extensibility 5.3'
Live life with an open mind

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 174 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1065KB.
Tokens: post-login.
Cache hits: 14: 0.00250s for 26,764 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]