Code: Select all
Function FUNC(x as integer, rn as Array) As Integer
Dim i as Integer
Dim FUNC as Integer
FUNC = 0
For i = 1 to UBound(rn) step 1
FUNC = FUNC + rn(i,1) * x^i
Next i
End Function
I've even put a FUNC=5 at the end to make SURE something is in FUNC. I've also renamed the thing to other names in case FUNC is a reserved word... I've tried clearing the formatting for the target cells in the spreadsheet. I've tried print()ing the value (I get a nice little pop up with the value of FUNC). Nothing seems to help.
Any ideas? It did work when I was messing with it earlier. It returned values. But somewhere along the bug-fixing way, the thing stopped responding.
OH. I wrote all that, then decided to close up the spreadsheet. This pops up when I try to save the sheet: Maybe that's it. How do I fix that? I added
Code: Select all
Sub main
End Sub