I am using a user form to pull cell colors to allow a user to set custom colors for reporting.
I thought I could use a for loop to set these sequentially but it doesn't seem to work. Is there a cleaner way of doing this?
"Aspect_" & i & "_Col" = Cells(7,14 + i).Interior.Color does not work
Similarly, is there a solution for establishing these variables in a cleaner fashion than listing them all out individually?
Thank you in advance.
I thought I could use a for loop to set these sequentially but it doesn't seem to work. Is there a cleaner way of doing this?
"Aspect_" & i & "_Col" = Cells(7,14 + i).Interior.Color does not work
Code:
Aspect_1_Col = Cells(7, 15).Interior.Color
Aspect_2_Col = Cells(7, 16).Interior.Color
Aspect_3_Col = Cells(7, 17).Interior.Color
Aspect_4_Col = Cells(7, 18).Interior.Color
Aspect_5_Col = Cells(7, 19).Interior.Color
Aspect_6_Col = Cells(7, 20).Interior.Color
Aspect_7_Col = Cells(7, 21).Interior.Color
Aspect_8_Col = Cells(7, 22).Interior.Color
Aspect_9_Col = Cells(7, 23).Interior.Color
Aspect_10_Col = Cells(7, 24).Interior.Color
Aspect_11_Col = Cells(7, 25).Interior.Color
Similarly, is there a solution for establishing these variables in a cleaner fashion than listing them all out individually?
Thank you in advance.
Last edited: