Thanks for the replies but is there a code that I can put in Module1? I have A LOT of worksheets. But I also tried that in a few sheets, and the function no longer worked if I do it that way. I also tried putting this:
...after End Function, but Excel still hangs when I open it.
Let me clarify what I want to do in case there is any misunderstanding.
I have a custom function using Function MyCustomFuction() which is in Modules/Module1. I call this =MyCustomFunction("...") in numerous worksheets and cells. But when I open Excel, Excel seems to execute this function on all the worksheets and Excel freezes. I would like Excel to not execute this function automatically on all sheets and only execute it when I click on a worksheet tab.
Bookmarks