View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default vba function module returns #NAME?

a regular module is the standard module you get when you use INSERT/MODULE
from the development IDE
-- as apposed to a Class module or code modules behind sheets and so on.
the default name will be Module1, then Module2 and so on.

If your module is named 'Class1' then this is the default name for a Class
Module, which is the wrong place for your code. cut and paste it into a
standard module, delete the class modue and see if that works

"Rick" wrote in message
...
Don:

What is a "regular" module?


"Don Guillett" wrote in message
...
I just tested your function in a REGULAR module and it worked just fine.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Rick" wrote in message
...
It's a simple function, so far:

Function Commission(Fee)
If Fee = 45 Then Commission = 15 Else Commission = Fee * 0.35
End Function

I've named my ranges. The module is in VBAProject | Modules.

I'm at a loss.