Private Sub Workbook_Open()
Application.AutomationSecurity = 1
Dim c As Integer
c = Sheets("Sheets1").Cells(1, 1)
c = c - 1
If c = 0 Then
Sheets("Sheet1").Select
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
End If
Sheets("Sheets1").Cells(1, 1) = c
End Sub
指定使用次数,可以用一个隐藏的表,将总次数存到其中一个单元格内
每打开一次,使其中的数值-1,当为0时实施需要的功能
Private Sub Workbook_Open()
Dim c As Integer
c = sheet("隐藏表名称").cells(1,1)
c = c - 1
If c = 0 Then
'需要执行的代码或模块
End If
sheet("隐藏表名称").cells(1,1) = c
End Sub