Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Counting Worksheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jnf40 - 14 Sep 2007 20:18 GMT
Is there a way to have the workbook count sheets and then have a message pop
up when it reaches a certain number?
Mike Fogleman - 14 Sep 2007 21:11 GMT
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
> Is there a way to have the workbook count sheets and then have a message
> pop
> up when it reaches a certain number?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.