开发者

Excel::VBA - How to reset the 'OnXXX' macros for worksheets

开发者 https://www.devze.com 2023-01-25 13:35 出处:网络
I have an old workbook (made by someone years ago) with a few worksheets in it. When I open this wo开发者_开发百科rkbook, Excel complains with messages like \'Cannot find ActivateWorksheet\', \'Cannot

I have an old workbook (made by someone years ago) with a few worksheets in it. When I open this wo开发者_开发百科rkbook, Excel complains with messages like 'Cannot find ActivateWorksheet', 'Cannot find DeActivateWorksheet'.

There are no event handlers in the code. I want to avoid getting these messages from Excel but could not find how to reset them. I checked the OnSheetActivate, OnSheetDeactivate etc properties to see if some macro is assigned but found them to be empty.

Is there any other place where I can check and remove these handlers?


It might be related to AddIns - do you have all the necessary AddIns installed?


There's one more place to look: NamedRanges. I found that the worksheet has Names defined with values such as "=ActivateWorksheet", "=DeActivateWorksheet" but these macros were nowhere. When a worksheet is activated, the Names on that sheet is refreshed (or recalculated) and i my case the macro were being called.

0

精彩评论

暂无评论...
验证码 换一张
取 消