Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: need a lil help in VBA  (Read 3179 times)

0 Members and 1 Guest are viewing this topic.

almatar00

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Windows 7
    need a lil help in VBA
    « on: June 24, 2014, 08:32:27 AM »
    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