Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel returns @name? error when using a custom written function in

I am new to Macros and VBA.

I have written a function in VBA and it returns a #Name? error when I use it
in the spreadsheet. I then tried a very simple function and that did exactly
the same so I believe I dont have a syntax error.

What am I dong wrong?

Al
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Excel returns @name? error when using a custom written function in

Are you putting the function in a regular code module, rather than in a
worksheet or ThisWorkbook module?

See http://www.mcgimpsey.com/excel/modules.html



In article ,
Al Maher wrote:

I am new to Macros and VBA.

I have written a function in VBA and it returns a #Name? error when I use it
in the spreadsheet. I then tried a very simple function and that did exactly
the same so I believe I dont have a syntax error.

What am I dong wrong?

Al

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel returns @name? error when using a custom written function in

You need to put UDFs in a standard code module, not a sheet module, or
ThisWorkbook.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Al Maher" wrote in message
...
I am new to Macros and VBA.

I have written a function in VBA and it returns a #Name? error when I use

it
in the spreadsheet. I then tried a very simple function and that did

exactly
the same so I believe I dont have a syntax error.

What am I dong wrong?

Al



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF(AND(OR function returns #VALUE! error Linda Excel Worksheet Functions 3 April 15th 09 06:00 PM
#VALUE! error with custom excel vba function Martin J. Excel Discussion (Misc queries) 8 October 6th 08 01:58 PM
Excel function LARGE returns error 'too few arguments' Browndoff Excel Worksheet Functions 5 July 26th 06 09:55 PM
Why sometimes excel returns error just because function parameters are linked? Paul134 Excel Worksheet Functions 2 February 28th 06 05:15 PM
Excel forgets Custom VBA Function (#Name error) R Avery[_2_] Excel Programming 7 May 24th 05 01:16 PM


All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"