Forum Discussion
mmatherne
Feb 17, 2024Copper Contributor
VBA Color Copier
I am very new to VBA. I have been trying to find the right VBA stuff to use to be able to copy over colors from another sheet. There are 6 different sheets in which I want to change the colors on the...
HansVogelaar
Feb 17, 2024MVP
Cells(OverallCell.Row, OverallCell.Column) is always on the active sheet.
Change
For Each OverallCell In OverallRange
Set DWeldsCell = Cells(OverallCell.Row, OverallCell.Column)
DWeldsCell.Interior.COLOR = OverallCell.Interior.COLOR
Next OverallCell
to
For Each OverallCell In OverallRange
Set DWeldsCell = DWeldsSheet.Cells(OverallCell.Row, OverallCell.Column)
DWeldsCell.Interior.COLOR = OverallCell.Interior.COLOR
Next OverallCell
and similar for the other sheets.