发现二次性的名称workbook open
发布网友
发布时间:2024-10-20 13:44
我来回答
共1个回答
热心网友
时间:2024-11-14 16:12
二义性吧,合并一下就是
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Sht As Worksheet
For Each Sht In ThisWorkbook.Sheets
If Sht.Name <> Sheet16.Name Then Sht.Visible = xlSheetVeryHidden
Next
End Sub
Private Sub Workbook_Open()
Dim Sht As Worksheet
For Each Sht In ThisWorkbook.Sheets
Sht.Visible = xlSheetVisible
Next
Application.Visible = False
UserForm1.Show
End Sub