Hi, I am trying to combine 3 interactive maps that I have made, into one workbook. They are all on there own separate workbook but I want to combine them all so I can look through all of them on the same workbook. I keep having the problem when I try to combine the workbooks because the names I used to label the corresponding info that is used in the Macro are the same. So when I combine them the macro keeps giving me an error. I don't completely understand how all of the fields correspond to the macro but I am looking for a solution to get them all to work on the same page by maybe changing how I name them.
Here is the Macro:
Sub ColorCode
For i = 3 To 53
Range("actReg").Value = Range("Macro!A" & i).Value
ActiveSheet.Shapes(Range("actReg").Value).Select
Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("actRegCode").Value).Interior.Color
Next i
Range("U21").Select
End Sub
The names that are the same are actReg, regData, actRegValue, actRegCode, class0, class1, class2, class3, class4, and class5.
I was wondering if I could change those names so that all three macros would run properly and what I would have to change in the macro to make it run properly.
Here is the Macro:
Sub ColorCode
For i = 3 To 53
Range("actReg").Value = Range("Macro!A" & i).Value
ActiveSheet.Shapes(Range("actReg").Value).Select
Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("actRegCode").Value).Interior.Color
Next i
Range("U21").Select
End Sub
The names that are the same are actReg, regData, actRegValue, actRegCode, class0, class1, class2, class3, class4, and class5.
I was wondering if I could change those names so that all three macros would run properly and what I would have to change in the macro to make it run properly.