On Fri, 17 Mar 2006 15:44:58 +0100, "Jesper F" <(E-Mail Removed)> wrote:
>I'm getting a "Compile error - user-defined type not defined" with this :
>
>In declarations:
>Private Type SelDim
> iWidth As Integer
> iHeight As Integer
>End Type
>
>In the module:
>Function SelectionDimension() As SelDim
> SelectionDimension.iWidth = 3
> SelectionDimension.iHeight = 4
>End Function
>
>What's wrong? Thanks.
>
>
>Jesper
>
I think maybe it's the way you're using it. I just noodled around with this for
a few seconds and I didn't get an error.
Function fSelectionDimension() As String
Dim SelectionDimension As SelDim
SelectionDimension.iWidth = 3
SelectionDimension.iHeight = 4
fSelectionDimension = SelectionDimension.iWidth & ", " &
SelectionDimension.iHeight
Debug.Print fSelectionDimension
End Function
Result was 3, 4.
HTH,
RD
|