Excel VBA: Answer gets “stuck”

前端 未结 1 1332
名媛妹妹
名媛妹妹 2020-11-27 08:16

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

相关标签:
1条回答
  • 2020-11-27 08:46

    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.

    0 讨论(0)
提交回复
热议问题