Excel error 1004 “Unable to get … property of WorksheetFunction class” appearing inconsistently

后端 未结 3 578
攒了一身酷
攒了一身酷 2020-11-30 12:02

I have a VBA function within a spreadsheet which operates on another spreadsheet that is opened in an earlier stage of my macro. The macro used to work fine but just recent

3条回答
  •  无人及你
    2020-11-30 13:08

    I got the "Unable to get * property of WorksheetFunction Class" error using Transpose, MMult,MDterm, and MInverse functions.

    I was able to get my code to run by putting "Option Base 1" in the Declarations (before the actual code) section of the particular Module in the Editer.

    Excel assumes "Option Base 0" which will add an extra row and column of empty cells. This will cause the error to occur and isn't immediately obvious to see.

提交回复
热议问题