How do I add a change event handler to a newly inserted sheet? Basically, I have a button that copies a hidden template sheet and insert it as a new sheet. However, the event handler does not copy.
You need to subscribe to the Change event of each Worksheet separately. Thus, after inserting a new one you need to subscribe to the event.
worksheet.Change += WorksheetChangeEventHandler;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.