Function VBAPassword(FileName As String, Optional Protect As Boolean = False)
    If Dir(FileName) = "" Then
       Exit Function
    Else
       FileCopy FileName, FileName & ".bak"
    End If

    Dim GetData As String * 5
    Open FileName For Binary As #1
    Dim CMGs As Long
    Dim DPBo As Long
    For I = 1 To LOF(1)
        Get #1, I, GetData
        If GetData = "CMG=""" Then CMGs = I
        If GetData = "[Host" Then DPBo = I - 2: Exit For
    Next
   
    If CMGs = 0 Then
       MsgBox "請先對VBA編碼設置一個保護密碼...", 32, "提示"
       GoTo clo
    End If

相关文章:

  • 2021-10-31
  • 2021-12-31
  • 2021-08-18
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
相关资源
相似解决方案