Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA from array to worksheet

Status
Not open for further replies.

citychap26

Programmer
Sep 19, 2004
144
GB
Hi All,

Want to copy from an array to excel worksheet. Is this the best way:

Code:
Sub test()

    Dim vARRAY(10000) As Variant
    Dim i As Integer
    Dim ws As Worksheets
    
    
    For i = 0 To 9999
        vARRAY(i) = i
    Next

    Worksheets("Sheet1").Range("A1", Range("A1").Offset(i, 0)).Value = Application.Transpose(vARRAY)
    

End Sub

Cheers

SK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top