With RNG. Borders (xlEdgeLeft)
. Graphics.linestyle=xlContinuous
. ColorIndex=0
. TintAndShade=0
The Weight=xlThin
End With
With RNG. Borders (xlEdgeBottom)
. Graphics.linestyle=xlContinuous
. ColorIndex=0
. TintAndShade=0
The Weight=xlThin
End With
With RNG. Borders (xlEdgeRight)
. Graphics.linestyle=xlContinuous
. ColorIndex=0
. TintAndShade=0
The Weight=xlThin
End With
With RNG. Borders (xlInsideVertical)
. Graphics.linestyle=xlContinuous
. ColorIndex=0
. TintAndShade=0
The Weight=xlThin
End With
CodePudding user response:
Also don't say what, say to simplifyThis code is not simplified have what problem?
Does it xlEdgeLeft xlEdgeBottom xlEdgeRight xlInsideVertical these constant out to see how much is the specific values, of sequence and looking for any way to write general formula, and then by cycle
CodePudding user response:
, four constants are respectively 7,9,10,11Then
The Set RNG=Range (myfind. Offset (1, 0), myfind. Offset (1, 2))
Dim as long I
For I=7 to 11
If I & lt;> 8 then
With RNG. Borders (I)
. Graphics.linestyle=xlContinuous
. ColorIndex=0
. TintAndShade=0
The Weight=xlThin
End With
End the if
Next
Did not test well, myself can not give it a try
CodePudding user response:
Same parts make a whole, write heads, in times of need, make a callCodePudding user response: