回覆列表
  • 1 # 吃一粒v努

    在beforesave事件中遍歷usedRange,把每個formula不為空的單元格加鎖

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)Dim sht As Worksheet, rC As RangeFor Each sht In Sheets sht.Unprotect With sht For Each rC In .UsedRange If rC.FormulaLocal <> "" Then rC.Locked = True Else rC.Locked = False End If Next End With sht.ProtectNextEnd Sub

    附件可參考

  • 中秋節和大豐收的關聯?
  • 請問5日,10日均線是怎麼算出來的?