Hello,
I would like to know what am I doing wrong here, I'm trying to assign values from 2000 to 2030 to my array ( the task demands of me to complete it using do while loop), but I'm constantly getting errors. Can anybody tell me what's wrong with my logic here?
I would like to know what am I doing wrong here, I'm trying to assign values from 2000 to 2030 to my array ( the task demands of me to complete it using do while loop), but I'm constantly getting errors. Can anybody tell me what's wrong with my logic here?
VBA Code:
Sub loop1()
Dim tab2(29) As Integer
Dim intc As Long
Dim intr, intm As Integer
intm = 0
intc = 2000
intr = 1
Do While intc <= 2030
tab2(intm) = intc
intm = intm + 1
intc = intc + 1
Loop
Do While intr <= 30
Cells(intr, 1) = tab2
intr = intr + 1
Loop
End Sub