SailFL
08-19-2005, 09:54 AM
I have created a user-defined data type which is a structure. I have declared the variable as a public type:
Type PaverArea
Company As String * 30
PaverCode As Integer
End Type
Public JobArea(1 to 9) as PaverArea
I placed both of these in the General declarations. But I get the following from the compiler: "Cannot define Public user-defined type within an Object Module" The code is part of a UserForm.
I thought this would be the place to put it. Where do I put my user-defined data type and public declared variable? And The book I have says, You define custom data types at the top of your module, before any procedures. If it is not General where would that be?
Thanks
Type PaverArea
Company As String * 30
PaverCode As Integer
End Type
Public JobArea(1 to 9) as PaverArea
I placed both of these in the General declarations. But I get the following from the compiler: "Cannot define Public user-defined type within an Object Module" The code is part of a UserForm.
I thought this would be the place to put it. Where do I put my user-defined data type and public declared variable? And The book I have says, You define custom data types at the top of your module, before any procedures. If it is not General where would that be?
Thanks