2009/6/25 Don Daugherty <[email protected]>:
> I've attempted to write my own spreadsheet function and got no results
> returned -- just the message "#VALUE!" and a status-bar message "Error:
> Wrong data type"
>
> I then implemented Andrew Pitonyak's WahooFunc (shown below with a number of
> lines commented out to make it ultra simple and easy to proofread.)
> When I enter "=WahooFunc()" into a spreadsheet cell, I again get the
> samemessages as above.  The spreadsheet seems to be finding the function
> because if I mis-enter the function, say as "= WahoFunc()", the cell message
> becomes  "#Name?" and the status-bar message becomes "Error: Invalid name"
>
> Function WahooFunc(Optional x) As Variant
> Dim s$
> s = "I am in WahooFunc.  "
>
> 'If IsMissing(x) Then
> '  s = s & "No Argument was passed."
> 'ElseIf NOT IsArray(x) Then
> '  s = s & "Scalar argument (" & CStr(x) & ") is type " & TypeName(x) & "."
> 'Else
> '  s = s & "Argument is an array (" & LBound(x, 1) & " To " & UBound(x, 1)
> &_
> '          ", " & LBound(x, 2) & " To " & UUBound(x, 2) & ")."
> 'EndIf
>
> WahooFunc = s
> End Function
>
> Ideas anyone?

I don't know what to say… I pasted the text to the Macro edit thing
and it worked, even when I removed all the comments.

OpenOffice.org 3.1.0
Ubuntu 8.10

Did you check your macro security settings? Mine is set to medium.

Johnny Rosenberg

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to