zoukankan      html  css  js  c++  java
  • VBA Excel 单元格操作

    1. 设置单元格边框:

    .Range("A3:M" & l + 1).Select
    With Selection.Borders()
      .LineStyle = xlContinuous
      .ColorIndex = 0
      .TintAndShade = 0
      .Weight = xlHairline'实线
    End With

    .Range("I3:M" & l + 1).Borders(xlEdgeLeft).Weight = xlThin'细实线
    .Range("I3:M" & l + 1).Borders(xlEdgeTop).Weight = xlThin
    .Range("I3:M" & l + 1).Borders(xlEdgeBottom).Weight = xlThin
    .Range("I3:M" & l + 1).Borders(xlEdgeRight).Weight = xlThin

    '若 产品不同,则“粗线”
    For i = 5 To l
      If .Cells(i, 6).Value <> .Cells(i - 1, 6).Value Then
        .Range("A" & i & ":P" & i).Borders(xlEdgeTop).Weight = xlThin
      End If
    Next i


  • 相关阅读:
    Unable to load dbxmss.dll (ErrorCode 16). It may be missing from the system Path
    同一网内机器无法连通解决一例
    Day.24
    Day.24
    Day.23
    Day.22
    Day.23
    Day.21
    Day.22
    Day.01-Day.20
  • 原文地址:https://www.cnblogs.com/ssfie/p/3800977.html
Copyright © 2011-2022 走看看