Excel VBA: Answer gets “stuck”

Functions called from a worksheet are not allowed to change sheets. Otherwise you could easily create infinite loops in the calculation tree. So everything that changes the sheet is ignored (such as RefreshTable() or .CurrentPage =) and causes the function to stop.

For completeness sake, there is a workaround, but you should not use it, and you may run into problems if you do.

Leave a Comment