I am getting the following error on the ** line in the below code
Error:
Application-defined or object-defined error
Function test()
Dim x, y, MyArray
ReDim MyArray(1 To 10, 1 To 5)
For x = 1 To 10
For y = 1 To 2
If x > y Then MyArray(x, y) = x & "," & y
MyArray(x, 4) = MyArray(x, 1)
Next y
Next x
** Range("A1").Resize(10, 4) = MyArray
End Function
--~--~---------~--~----~------------~-------~--~----~
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain @ [email protected] or
Ashish Jain @ [email protected]
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!
We reach over 5,000 subscribers worldwide and receive many nice notes about the
learning and support from the group. Our goal is to have 10,000 subscribers by
the end of 2009. Let friends and co-workers know they can subscribe to group at
http://groups.google.com/group/excel-macros/subscribe
-~----------~----~----~----~------~----~------~--~---