Enantiomeer
Enantiomeer

Reputation: 59

UDF is not recognised in excel 2010

I am having a problem with incorporating User Defined Functions in excel. For some reason the function is not recognised. The (simplified) code is as follows:

Option Explicit
Option Base 1

Function Dummy(A As Range, _
               B As Range, _
               C As Double, _
               D As Double) As Double

' This function doesn't do anything

End Function

When I use the function in a cell it returns the #NAME? error.enter image description here

Strangely enough when I started typing "=du" in the cell excel did find the function.enter image description here

When I use the error checking function of excel this clearly shows that the function is not recognised.enter image description here

I know this error can occur in case the VBA module is stored in a user form, a sheet or "ThisWorkbook". However that is not the case here.enter image description here

Can anyone tell me what I am doing wrong here?

Upvotes: 2

Views: 168

Answers (1)

TechnoDabbler
TechnoDabbler

Reputation: 1265

Rename your module or your function. The module name and the function name cannot both be "Dummy".

Upvotes: 4

Related Questions