I want to dynamically copy an unknown number of multiple ranges from one spreadsheet to another.
The list of ranges is stored in a table in the "to" spreadsheet with the
- ranges from in a list called "list_from" and the
- ranges to in a list called "list_to"
I want the variable The_Range_from to be able to store multiple ranges so I can access them later when I am in the "From Spreadsheet".
The bolded line always blows up with "run time error 438; Object does not support this property"
Is this possible to do?
Thanks
RK
------------------------------------------------------
Dim FieldList_from() As String
Dim FieldList_toto() As String
Dim The_Range_from() As Range
For X = 1 To Range("List_from").Rows.Count
FieldList_from(X) = Range("List_from").Cells(X).Value
FieldList_toto(X) = Range("List_toto").Cells(X).Value
Set The_Range_from(X) = Range(FieldList_toto(X))
Next X
The list of ranges is stored in a table in the "to" spreadsheet with the
- ranges from in a list called "list_from" and the
- ranges to in a list called "list_to"
I want the variable The_Range_from to be able to store multiple ranges so I can access them later when I am in the "From Spreadsheet".
The bolded line always blows up with "run time error 438; Object does not support this property"
Is this possible to do?
Thanks
RK
------------------------------------------------------
Dim FieldList_from() As String
Dim FieldList_toto() As String
Dim The_Range_from() As Range
For X = 1 To Range("List_from").Rows.Count
FieldList_from(X) = Range("List_from").Cells(X).Value
FieldList_toto(X) = Range("List_toto").Cells(X).Value
Set The_Range_from(X) = Range(FieldList_toto(X))
Next X