Excel Array Function only return first item

F

Franck

Hi, got this function in my AutoDual Class for Excel

Public Function test5()
Dim theValues(9) As Object

For i As Integer = 0 To 9
theValues(i) = i
Next

Return theValues
End Function

When I select 10 cells in my Excel spreadsheet and use this function
with Ctrl+Shift+Enter, all the cells values are 0 !

Why does my function only return first item ?

Thks for help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top