Sub DrawI(ByVal Target As Range, ByVal dH As Double, ByVal dW As Double, _
ByVal dThick1 As Double, ByVal dThick2 As Double)
Dim shp1 As Shape, shp2 As Shape, shp3 As Shape
Dim dTop1 As Double, dTop2 As Double, dTop3 As Double
Dim dLeft1 As Double, dLeft2 As Double, dLeft3 As Double
On Error Resume Next
dTop1 = Target.Top: dLeft1 = Target.Left
dTop2 = dTop1 + dThick1: dLeft2 = dLeft1 + dW / 2 - dThick2 / 2
dTop3 = dTop1 + dH - dThick1: dLeft3 = dLeft1
With Target.Parent
.Shapes("tmpShape1").Delete
.Shapes("tmpShape2").Delete
.Shapes("tmpShape3").Delete
Set shp1 = .Shapes.AddShape(1, dLeft1, dTop1, dW, dThick1)
Set shp2 = .Shapes.AddShape(1, dLeft2, dTop2, dThick2, dH - 2 * dThick1)
Set shp3 = .Shapes.AddShape(1, dLeft3, dTop3, dW, dThick1)
End With
shp1.Name = "tmpShape1"
shp2.Name = "tmpShape2"
shp3.Name = "tmpShape3"
End Sub