UDF returns #NAME?

wadevcamp

New Member
Joined
Jul 18, 2012
Messages
16
UDFs in PERSONAL.XLSB are not being recognized. I put the following VBA code into PERSONAL.XLSB and in the spreadsheet entered "=prnt(2)", and the result is #NAME?". I then created a VBA module within the open spreadsheet, copied the code into it, and it works just fine.

The PERSONAL.XLSB file is trusted, and is not a disabled add-in.

PLEASE HELP!

VBA Code:
Function PRNT(i As Integer)
'
PRNT = i + 1

End Function

Sub test()
i = PRNT(3)
MsgBox ("result is " & i)
End Sub
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You need to use
Excel Formula:
=personal.xlsb!prnt(2)
 
Upvote 0
Is there a way to tell my workbook to include personal.xlsb in the references it checks automatically (instead of brute forcing it by telling it the name of the workbook to check???
 
Upvote 0
Not that I'm aware of, unless you turn it into an add-in.
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top