I\'m new to VBA in Excel 2003. I\'ve written a UDF that takes in two strings: one filter and one that will be a cell reference. When I am debugging and call the function a
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.