Cells filling by array

Closed
Report
-
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
-
Hello,
i have a problem in Excel 2007 in VBA. I have this code (part):

Dim Oblast As Range
Set Oblast = Worksheets(2).Range("H1:H" & Poradi)
Oblast = Ceniky

Ceniky looks like:

Ceniky(1) = 1
Ceniky(2) = 2
Ceniky(3) = 301
Ceniky(4) = 302
etc.

But "Oblast (1 to 37) as long" is after this so:
Oblast.Formula(or Value2)(1,1) = 1
Oblast.Formula(2,1) = 1
Oblast.Formula(3,1) = 1
-> so in each cell ist value 1

Do you know why?

Thanks

Jiri

1 reply

Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Put the complete procedure. What you put here is difficult to understand