Sub Paint()
Dim i As Integer
For i = 1 To 50
'First, paint the state shapes
Range("actorder").Value = i
ActiveSheet.Shapes(Range("actstate").Value).Fill.ForeColor.RGB = _
Range(Range("actcolorcode").Value).Interior.Color
ActiveSheet.Shapes(Range("acttext").Value).Select
With Selection
'Second, update the text boxes
.Text = Range("acttextvalue").Value
'(Optional) Format the text boxes
.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
.ShapeRange.Fill.Transparency = 0.3
.ShapeRange.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(0, 0, 0)
.ShapeRange.TextFrame2.TextRange.Font.Shadow.Visible = False
.ShapeRange.TextFrame2.MarginLeft = 2.5
.ShapeRange.TextFrame2.MarginRight = 2.5
End With
Next i
End Sub