Is there a way to copy an object from a reference (range or cell for example) to a variable?
The reason why I want to do this is because I have a huge macro that calculates a lot of things and uses many copy+paste operations and it loops over many cells and alters them. This does not perform very well at all, so I wanted to minimize the GUI operations and work in the background, this way I could have the whole result in an array which I paste to the GUI in the end. The problem is that I need the objects not just the value of the cells/ranges because I need also to alter other properties (e.g. size or color).
Operations like looping on individual cells are slow because of the overhead associated with each call to the object model. So the trick is to work with multiple cells in each call.
For values you can get an array of values from a range of cells into a variant resulting in a 2-dimensional array, and then you can assign the array back to the range
for formats you either need to use a conditional format for a large range of cells or copy a format and paste it to a large range of cells.