I'm trying to use a public User Defined Type from within a class module. The UDT has been declared in a public module, the instance in a class module, like this:
VB Code:
  1. 'Module:
  2. Public Type tText
  3.     Font As String
  4.     Format As String
  5. End Type
  6.  
  7. 'Class Module
  8. Public Text as tText
This is not allowed, apparently. The compiler gives me this error:
Quote Originally Posted by VB Compiler
Constants, fixed-length strings, arrays, user-defined types and Declare statements not allowed as Public members of object modules.
Why can't UDT's be used publicly?