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?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to