1.

Solve : need a lil help in VBA?

Answer»

Good day all,
Im new to VBA, and i have a for loop throu an array but i dont KNOW how to put the out on a specific CELL instead of the MsgBox. i want my out put of the array to be put on cell E6..can we do this?

Sub TEST()
Dim MYARRAY As Variant
Dim x As Integer
Dim cell As Integer
myArray = Array(10,20,30,40,50) 'define array

For x = LBound(myArray) To UBound(myArray) 'define start and end of array

MsgBox (myArray(x))

NEXT x ' Loop!

End Sub



Discussion

No Comment Found