View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones[_2_] Norman Jones[_2_] is offline
external usenet poster
 
Posts: 421
Default How do I create a User Defined Function using VBA in Excel 2007?

Hi Robert,

Your UDF is located in a standard module
of the active workbook?




---
Regards.
Norman


"Robert" wrote in message
...
I am running Excel 2007 on Windows Vista using Parallels Desktop for MAC,
as
the excel version for MACs computer does not support VBA functionality (my
MAC is a 2.8GHz Intel Core Duo machine running MAC OS 10.5.3 - the type of
processor which would allow me to create a vitural IBM PC and run all MS
applications as if I were on an actual IBM PC).

When using prior versions of Excel (from ealier version of Microsoft's OS)
I
was happily able to create and use user defined functions I had created in
VBA.

Now it seems as though when I create even the simplest of functions:

Option Explicit

Function doll(st As Single) As Single

Dim rate As Single
rate = 1.5
doll = st * rate

End Function

Excel 2007 does not recognize this and in the cell in which I am
attempting
to call it all I get is the infamous #NAME? error message (for which
scarce
useful information is provided).

I am wondering if there is some switch I am not setting correctly or
something else I just haven't configured. The new version of excel is
diferent enough that do not where any of these settings may be.

Any help provided would be greatly appreciated.