Forum Discussion
Excel VBA under MSoffice 365
Have made numerous spreadsheets with technical calculations on older versions of Excel;
Everytime excel migrates, I experience problems.
Right now, under MS Office 365, Win11, 64 bit, I cannot get a new function to work, very simple check case:
Public Function test2(n)
test2 = n
End Function
Settings: VBA tools/references used:
In the worksheet under file/options/trust centre settings I select: "trust VBA macro's"
same, under file /options/add-ins I have "solver addin" and "analysis toolpak".
error returned is #name, "compile VBA project" does not give errors.
I must be doing something basic wrong, but what?
5 Replies
Do you have a module also named Test2 in the workbook in the Visual Basic editor? That would confuse Excel.
If so, give the module another name.