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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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,215,130
Messages
6,123,220
Members
449,091
Latest member
jeremy_bp001

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