I believe this question should be in the Excel zone.
Main Topics
Browse All TopicsHi,
I would like to let my code take control of a new worksheet regardless of whether it is created by Insert/Worksheet or Move or Copy/Copy. The New Sheet event doesn't occur in the latter case, neither for the Workbook, nor for the Application. Any ideas any one?
Thanks.
awink
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Patrick,
It's quite a big file, and since my code doesn't do what I want, what is the point of uploading it? So, what would you like to see? There are two event macros put in for testing purposes, one for the worksheet object, the other for the application object. Both work fine when I insert a sheet using the Insert command and neither fires when using the Create Copy command. The subs are copied from MS Help, unchanged, but I'll be glad to upload them, if that is what you are after. If you feel there is a fault in the environment the file is too complex and I would prefer a solution that works on a blank workbook.
Regards
awink
awink,
I can reproduce your problem with not trapping the new sheet event when you use the Edit...Move or Copy menu item, but the Insert...Worksheet menu item works just fine.
I was able to trap the new sheet in both cases using the Worksheet_SheetActivate event sub as shown in the snippet below. Whenever a new worksheet is activated, the code compares the number of worksheets to a variable that stores the old value. If there is an increase, then a worksheet must have been added.
Brad
Business Accounts
Answer for Membership
by: patrickabPosted on 2009-11-01 at 03:18:02ID: 25713321
awink,
Please upload your file & macro
Patrick