回覆列表
  • 1 # Excel大白

    這個可以用表格事件來實現:開啟“開發工具”—“Visual Basic—“在右邊的視窗選擇Wroksheet物件和Change過程”—把程式碼複製進進去—然後儲存excel檔案為“

    .xlsm

    ”格式。

    If Target <> "" Then

    Target.Select

    With Selection.Borders(xlEdgeLeft)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    With Selection.Borders(xlEdgeTop)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    With Selection.Borders(xlEdgeBottom)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    With Selection.Borders(xlEdgeRight)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    With Selection.Borders(xlInsideVertical)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    With Selection.Borders(xlInsideHorizontal)

    .LineStyle = xlContinuous

    .ColorIndex = 0

    .TintAndShade = 0

    .Weight = xlThin

    End With

    End If

  • 中秋節和大豐收的關聯?
  • 一個雪糕的卡路里是多少?