Re: Setting default values of user defined data type
From: Peter Beach (pbeach_at_globe.net.nz)
Date: 07/13/04
- Next message: ElkySS: ""AND" statments in Excell 2000"
- Previous message: Gunnar Johansson: "Can you registrate a drag and drop event?"
- In reply to: Adrian: "Setting default values of user defined data type"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Jul 2004 16:48:41 +1200
Hi Adrian,
Sadly you can't :-( On the bright-side, posting something like "you can't"
often produces a flood of postings saying "Oh, yes, you can", but I think in
this case I'm moderately safe.
VB/VBA will initialise all strings to empty, all numeric values to zero and
all booleans to False. So you could add a boolean item to your UDT called
(say) Initialised and then if it is False you could call an explicit
initialisation routine. I think that that is the best you can do I'm
afraid.
Regards,
Peter Beach
"Adrian" <xinke@hotmail.com> wrote in message
news:OSlLFvIaEHA.212@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> Can we set the default values of user-defined data types ? Thanks.
>
> The following code doesn't work ...
> " Type ABC
>
> var1 as string * 30 = "Test"
>
> End Type
> "
>
> regards,
> Adrian
>
>
- Next message: ElkySS: ""AND" statments in Excell 2000"
- Previous message: Gunnar Johansson: "Can you registrate a drag and drop event?"
- In reply to: Adrian: "Setting default values of user defined data type"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|