Howto create a public object module in visio? 
Author Message
 Howto create a public object module in visio?

Hi all,
I have a public user-defined type in a module:
Public Type MP_Stage
   MP As String
   Stage As String
End Type

I want to convert it to a Variant, which should be possible for custom types
(says the help). So I can store the types in an array.
I get the error: "Only user-defined types defined in public object modules
can be coerced to or from a variant or passed to late-bound functions."

So if this isn't, what is a public object module?
How to fix it, when I create my own class it's also not possible to store it
as a variant.
Thanks Mike



Fri, 11 Apr 2003 03:00:00 GMT  
 Howto create a public object module in visio?
Mike,

You have 2 options here:

1. Declare the UDT as Private in the class module (I assume that you're in
the ThisDocument module).
--or--
2. Insert into your project a Module (equivalent of a VB .bas file), and
declare the UDT as Public.

--Chadbl



Quote:
> Hi all,
> I have a public user-defined type in a module:
> Public Type MP_Stage
>    MP As String
>    Stage As String
> End Type

> I want to convert it to a Variant, which should be possible for custom
types
> (says the help). So I can store the types in an array.
> I get the error: "Only user-defined types defined in public object modules
> can be coerced to or from a variant or passed to late-bound functions."

> So if this isn't, what is a public object module?
> How to fix it, when I create my own class it's also not possible to store
it
> as a variant.
> Thanks Mike



Wed, 07 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Only public datatypes defined in public object modules...

2. Public Object Module

3. Public array in an object module

4. Public object modules

5. Want to pass UDT to Public object module

6. Binary compatibility, Public Class, Name conflicts with existing module, project, or object library

7. Reasons why I cannot create a public sub write in a class module

8. Public object modules?

9. What is a public object module?

10. creating visio object through asp

11. Coding VBA in a MS Word Object created in a Visio document

12. visio diagram to XML / creating textfiles with VBA in Visio

 

 
Powered by phpBB® Forum Software