Hi,
I am trying to create a user form that toggles the spreadsheet view between the normal cells interior colors and colors that depend on the cell content (e.g. yellow for a formula etc.)
I have created the form and the procedures that actually perform the actions. My problem is that when loading the form, I want to store the color of each cell of the UsedRange in an bi-dimensional array, so that I can restore the original colors of the spreadsheet (making sense so far? )
That array needs to be public because I will need to use it in several procedures such as togglebutton1_change, userform_terminate etc. Therefore I have tried to delare it at the top of the form's code as a public variable.
Unfortunately I get the following message: "Constants, fixed-length strings, arrays, user-defined types, and Declare statements not allowed as Public members of an object module"
The VBA help suggests to "use a set of Property procedures that accept and return a Variant containing an array", but I am afraid I have not reach that level of competency yet. Could someone explain to me in detail what I should do?
Many thanks!
Bookmarks