about & operator

2

2008rasko

i have a question about & operator.i was using that operator in a
vicious circle ( for x ...next x ).
but that operator not runing with my vicious..

example :
sub report()

cash1= 25/05/2008
for i = 1 to 10
'PROBLEM THIS BELOW!!!
"cash"& i = cash1 + i
next i

end sub

i want to that result
cash2 = 26/05/2008
cash3 = 27/05/2008

how can i do it?
 
J

Jarek Kujawa

will this help?

Sub report()


cash1 = #5/25/2008#
For i = 1 To 10
ActiveCell.Offset(i, 0).Value = "cash" & i & " = " & DateSerial
(Year(cash1), Month(cash1), Day(cash1) + i)
Next i


End Sub
 
B

Bob Phillips

Dim cash As Variant

Redim cash ( 1 To 10)
For i = 1 To 10

cash(i) = DateSerial(2008,5,25) + i
Next i
 
Top