greenskies
New Member
- Joined
- Feb 24, 2017
- Messages
- 2
There is a website that I got instructions on how to create a thematic map that allows the shapes in map I created change color based on certain range of values. I created 3 shapes on map. However as I run macro it gives me error below.
Error message:
Run Time error '1004'
Method 'Range' of object' _Global' failed
Macro is below -
Sub marcoColor()
For i = 4 To 6
Range("actReg").Value = Range("Sheet1!A" & i).Value
ActiveSheet.Shapes(Range("actReg").Value).Select
Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("actRegCode").Value).Interior.Color
Next I
End Sub
Item in bold is where excel states the error is.
Any suggestions as to reason why this macro is not working for me?
Error message:
Run Time error '1004'
Method 'Range' of object' _Global' failed
Macro is below -
Sub marcoColor()
For i = 4 To 6
Range("actReg").Value = Range("Sheet1!A" & i).Value
ActiveSheet.Shapes(Range("actReg").Value).Select
Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("actRegCode").Value).Interior.Color
Next I
End Sub
Item in bold is where excel states the error is.
Any suggestions as to reason why this macro is not working for me?