How to call VBA function from Excel cells (2010)?

前端 未结 9 1804
暖寄归人
暖寄归人 2020-11-29 06:11

I defined a few functions in a workbook using VBA, and then expected to be able to use them in a cell formula - but Excel does not recognise the function. I just get #NAME?<

9条回答
  •  醉话见心
    2020-11-29 06:50

    I faced the same issue, after struggling around following worked for me:

    My function was inside a module in macro workbook called Personal.XLSB. I prefixed the function name with the personal macro workbook filename and !, so if function name is theFunction(x,y) I entered in cell "=PERSONAL.XLSB!theFunction(x,y). This worked.

    Please note that PERSONAL.XLSB is always open in hidden mode for me.

提交回复
热议问题