View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Counting Worksheets

Something like this put in the ThisWorkbook code module:

Private Sub Workbook_NewSheet(ByVal Sh As Object)
If Sheets.Count 3 Then MsgBox "Too many sheets."
End Sub

Mike F
"jnf40" wrote in message
...
Is there a way to have the workbook count sheets and then have a message
pop
up when it reaches a certain number?