excel为什么突然没有表格边框线? 5
看样子是清除了原有的格式。不过可以用代码添加边线。
Sub Demo()
Set FindRng = ActiveSheet.UsedRange
With FindRng
Set C = .Find(What:="试室", LookAt:=xlPart)
If Not C Is Nothing Then
FirstAddress = C.Address
Do
With C.CurrentRegion
.Borders.TintAndShade = 0
.BorderAround Weight:=xlMedium
.HorizontalAlignment = xlCenter
End With
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> FirstAddress
End If
End With
End Sub
这是运行前后对比图