Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A UDT is not a typelib! Typelibs require a reference; UDTs require
definition same as variables do. "User-defined type not defined" error suggests you're passing a ref to a UDT that doesn't exist. For example... Type udtMyType My1 As Boolean: My2 As Long: My3 As String End Type Public MyType As udtMyType ...and somewhere in code you'd use these like this... Sub InitGlobals MyType.My1 = ThisWorkbook.Saved If MyType.My1 Then MyType.My2 = 1: MyType.My3 = "Yes" Else MyType.My2 = 0: MyType.My3 = "No" End If End Sub ...where this will compile without error. Note that as soon as you type "MyType." intellisense displays the list of types as defined in your Type declaration. Trying to compile 'MyType.My0' will throw an error! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile error: User-defined type not defined | Excel Programming | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |