Help needed with a collection. Lot of thanks

M

mtorres.f

Hi everyone, Im really new at this and Im working with a collection.
I want to simplify it:

This is part of the code
Set nuevoactivo = New Activo

nuevoactivo.Codigo = Sheets("Cartera SII").Cells(k, 1)
nuevoactivo.sFPG000015 = Cells(i,j)
nuevoactivo.sFPG000632 = Cells(i,j)
nuevoactivo.sFIG002826 = Cells(i,j)
nuevoactivo.sFIG002827 = Cells(i,j)
nuevoactivo.sFIG002852 = Cells(i,j)
nuevoactivo.sFIB002233 = Cells(i,j)
nuevoactivo.sFIH002231 = Cells(i,j)
nuevoactivo.sFPG001144 = Cells(i,j)
....
.....
.....
.....
mlistaactivos.Add nuevoactivo, nuevoactivo.Codigo

an I also have an array with the codes:

Fondos(1)=FPG000015
Fondos(2)=FPG000632
Fondos(3)=FIG002826
Fondos(4)=FIG002827
Fondos(5)=FIG002852
Fondos(6)=FIB002233
......
......

I tryed to do the following but it doesn´t work:

For i=1 to n
For j= 1 to n

mlistaactivos(i).s & Fondos(i)= cells(i,j)

next j
next i


Any idea? I really appreciate it!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top