How do I apply a SumIf Formula in a VBA Sub? Getting Error 1004

后端 未结 1 1639
自闭症患者
自闭症患者 2020-11-27 08:43

I am trying to create a Sub that places a SUMIF formula in a cell. I have reduced the problem to a simple setup:

Private Sub CommandButton1_Clic         


        
相关标签:
1条回答
  • 2020-11-27 09:10

    .Formula accepts formulas in English.
    Parameter separator in English is ,.

    If you want to use formulas in the language of your Excel installation, use .FormulaLocal.

    However to ensure your code will run on any Excel, fix your formula to be in accordance with the en-us locale.

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