JasonMallon
New Member
Hi Everyone,
I have set up a basic macro with the help of this site and others, to map colours onto a map. However I keep getting run time error '1004' when I go to complete it. A VBA Macro for just one shape worked fine but it wont work when I try and loop it. Any suggestions would be great. Please see the code below and the file attached.
Thanks in advance,
Jason
I have set up a basic macro with the help of this site and others, to map colours onto a map. However I keep getting run time error '1004' when I go to complete it. A VBA Macro for just one shape worked fine but it wont work when I try and loop it. Any suggestions would be great. Please see the code below and the file attached.
Code:
Sub Macro6()
For i = 1 To 5
Range("actCounty").Value = Range("Sheet2" & i).Value
ActiveSheet.Shapes(Range("actCounty").Value).Select
Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("actCountyCode").Value).Interior.Color
Next i
Range("B54").Select
End Sub
Thanks in advance,
Jason