You need to use assign FormatData(y) to something (the data= part).
Like this:
'--------------------------------------
Window1.Interpolate:
Sub Interpolate()
Dim y As Double
Dim data As String
y=1234
data=FormatData(y) 'PASSING Y TO FUNCTION...??
End Sub
'--------------------------------
Hope this helps,
.../j
At 02:50 PM 04/28/2005, Eirik Karlsen wrote:
>Can anyone see what I'm doing woring here:
>'--------------------------------------
>Window1.Interpolate:
>Sub Interpolate()
>
> Dim y As Double
> Dim data As String
>
> y=1234
> FormatData(y) 'PASSING Y TO FUNCTION...??
>
>End Sub
>'--------------------------------
>
>'-------------------------------
>Window1.FormatData:
>Function FormatData(y As Double) As String
>
> Dim data As String
> data="qwerty"
>
> Return data 'RETURNING DATA AS STRING...??
>End Function
>'---------------------------------
>
>The basic idea was to pass y as double to the function and having it
>return data as string...
>But I get a compilation error:
>"* You must use the value returned by this function in
>Window1.Interpolate, line 7:
>FormatData(y)"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|