Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003. Assign array to range
Hi everyone, and sorry for my english
I have an excel application, developed in Excel XP. In a line of code, I have this statement: MyRange.Value = myArray myArray is a two dimensions array, which has the same number of rows and columns than the range object I'm trying to assign. This code runs without problems in XP, but when I try to run it under Excel 2003, I'm getting the error "Application or object defined error". ¿Any suggestion? thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003. Assign array to range
Sub AA()
Dim myRange As Range Dim myarray(1 To 3, 1 To 10) As Long For i = 1 To 3 For j = 1 To 10 myarray(i, j) = i * j Next Next Set myRange = Range("M10").Resize(1, 10) myRange.Value = myarray End Sub worked fine for me in xl2003. -- Regards, Tom Ogilvy "Jorge Vinuales" wrote: Hi everyone, and sorry for my english I have an excel application, developed in Excel XP. In a line of code, I have this statement: MyRange.Value = myArray myArray is a two dimensions array, which has the same number of rows and columns than the range object I'm trying to assign. This code runs without problems in XP, but when I try to run it under Excel 2003, I'm getting the error "Application or object defined error". ¿Any suggestion? thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003. Assign array to range
Yes, thanks Tom.
I have realized that the problem must be with one of the formulas of the array. The values of the array are numbers and sometimes formulas. Some of them are causing some kind of problem but if I try to write by hand those formulas in the worksheet, there is no problem with them. I suppose that my problem could be the language version (spanish) I'll continue investigating... "Tom Ogilvy" escribió en el mensaje ... Sub AA() Dim myRange As Range Dim myarray(1 To 3, 1 To 10) As Long For i = 1 To 3 For j = 1 To 10 myarray(i, j) = i * j Next Next Set myRange = Range("M10").Resize(1, 10) myRange.Value = myarray End Sub worked fine for me in xl2003. -- Regards, Tom Ogilvy "Jorge Vinuales" wrote: Hi everyone, and sorry for my english I have an excel application, developed in Excel XP. In a line of code, I have this statement: MyRange.Value = myArray myArray is a two dimensions array, which has the same number of rows and columns than the range object I'm trying to assign. This code runs without problems in XP, but when I try to run it under Excel 2003, I'm getting the error "Application or object defined error". ¿Any suggestion? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 Add-ins - Assign Number | Excel Worksheet Functions | |||
How do I assign sequential numbers in an Excel 2003 PO template? | Excel Worksheet Functions | |||
Can't assign to Array .GetRows in Excel 97 | Excel Programming | |||
Can't assign to Array .GetRows in Excel 97 | Excel Programming | |||
Assign macro to button in EXCEL 2003 | Excel Programming |