VBA Copying Independant Class Module

Mikro64

New Member
Joined
May 10, 2020
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hi Guys
(My first post so please let me know if I have broken any Rules)

What I am trying to achieve is to copy the contents of one Array (that is based on a Class Module) into another. Then make changes to the results of one of the arrays by user inputs & then be able to compare them to the original to see the changes.

I have set up a Class Module called Cl_Oqe_Top

Then set 2 Arrays: Public ItpInf(1 To 1000) As New Cl_Oqe_Top (the original with dimensions)
Public OqeInf() As New Cl_Oqe_Top (the version which will be a copy, dimensionless)

In my code I have; OqeInf = ItpInf

This copies the contents of ItpInf into OqeInf, but if I make any changes to ItpInf it also changes them in OqeInf.

How can I copy the contents of ItpInf into OqeInf & then when I make changes it doesn't effect both??
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top