yuyu2860 发表于 2012-4-12 22:27:49

谁可以解释下这个代码?

Dim szly As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Call DeleteButton
    Call DeleteMenu
    Call removeMenuItem
End Sub
Private Sub Workbook_Open()
szly = True
Dim s(2) As Date
    s(0) = "2011/7/29"
    s(1) = "2013/3/30"
    If Not (Now >= s(0) And Now <= s(1)) Then
    MsgBox "软件已....."
    On Error Resume Next
   AddIns(filterpath(ThisWorkbook.Name, 4)).Installed = False

   'Name ThisWorkbook.Path & "\" & ThisWorkbook.Name As ThisWorkbook.Path & "\aa" & ThisWorkbook.Name & "zz"
    End
    End If
'''    If Dir("c:\windows\system32\comdlg32.ocx") = "" Then
''''复制当前文件夹下的到此文件夹内,再注册此文件
''''
''''FileCopy ThisWorkbook.Path & "\SYSkj\comdlg32.ocx", "c:\windows\system32\comdlg32.ocx"
'''Shell "regsvr32.exe /s C:\Windows\System32\comdlg32.ocx"
'''End If
    Call CreateButton
    Call CreateMenu
   ' Call addMenuItem
    '''UserForm2.Show ' vbModeless
   

End Sub
页: [1]
查看完整版本: 谁可以解释下这个代码?