Author Topic: Macro-equivalent UDFs non-volatile  (Read 635 times)


  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Macro-equivalent UDFs non-volatile
« on: March 27, 2015, 06:54:04 PM »

I have some macro equivalent functions with xl_cell arguments that I want to write, but I need them not to be volatile.

In Microsoft's documentation (, they have this explanation:
By default, Excel handles XLL UDFs that take range arguments and that are declared as macro-sheet equivalents as volatile. You can turn this default state off using the xlfVolatile function when the UDF is first called.

But the xlfVolatile function does not appear to be exposed in PyXLL. This is unfortunate because I suspect that might solve the problem: in Excel-DNA, which is a free PyXLL-equivalent product for MS Visual Studio, it is exposed and seems to work as intended (i.e. my Range macro-equivalent functions are not volatile).

Is there a work-around? I have tried calling xl_app.Volatile(False) in my PyXLL UDF but it seems to have no effect.

Any help would be greatly appreciated! Thanks



  • Administrator
  • Hero Member
  • *****
  • Posts: 661
  • Karma: 15
    • View Profile
Re: Macro-equivalent UDFs non-volatile
« Reply #1 on: March 29, 2015, 02:29:25 PM »
Hi Aaron,

I've added a xlfVolatile wrapper to pyxll, and it will be in the next version 2.3.0.

You can try it out now using the beta version, which you can download from

Best regards,