|
-
Apr 22nd, 2004, 05:18 AM
#1
Thread Starter
Evil Genius
Returning UDT from Class Function
Hi everyone!!!
According to this page (http://msdn.microsoft.com/vba/Prodinfo/features.asp) this should be possible to do! I've got the following code I'm trying to use in a word vba class module (which has been made public):
VB Code:
Public Type udtSTYLEFONTINFO
Bold As Boolean
CharacterSpacing As Integer
Colour As String
Italic As Boolean
Size As Integer
SmallCaps As Boolean
Underline As Boolean
End Type
Public Function GetStyleFontInfo(ByVal strStyleName As String) As udtSTYLEFONTINFO
GetStyleFontInfo.bold = true
End Sub
When I hit space after the as part of the function declaration, or try to write the .bold = true part, I get no intellisense for the custom udt appear. If I try to run the code, it highlights the "As udtSTYLEFONTINFO" part stating "User defined type not defined".
Um, HELP!!!!! please!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|