J
jat
i want to prevent users from adding new or blank worksheets on a form, but i
cannot get the code below to work:
Private Sub Workbook_NewSheet(ByVal Sh As Object)
If Not BlockInsertSheet Then Exit Sub
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
Sh.Delete
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
i have te code in the Microsoft Excel Objects, This Workbook module but i
cannot get it to work. what's missing?
jat
cannot get the code below to work:
Private Sub Workbook_NewSheet(ByVal Sh As Object)
If Not BlockInsertSheet Then Exit Sub
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
Sh.Delete
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
i have te code in the Microsoft Excel Objects, This Workbook module but i
cannot get it to work. what's missing?
jat