Functions in VBA used in spreadsheet cell
Make sure your function is in a General module--not under the ThisWorkbook
module, not behind a worksheet module.
Make sure you allow macros to run when you open your workbook.
And if you use ranges in your formula, make sure you're spelling the addresses
correctly.
If the problem doesn't go away, then make sure you share what you typed into the
cell.
ps. I'm assuming the typos in the function are just in the post. In the
future, it's better to copy directly from your code and paste into the message.
JRXPL wrote:
I have written an extremely simple function in VBA module for sheet 1 and
when I try to use that function in a cell in sheet 1 I get a *Name? error.
Has anyone seen this before? How do I get the function to work?
Function CalculateOne (a,b)
CalculateOne = 2*a + b
EndFunction
--
Thank you,
JRXPL
--
Dave Peterson
|