+ Reply to Thread
Results 1 to 3 of 3

Excel returns @name? error when using a custom written function in

  1. #1
    Al Maher
    Guest

    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. #2
    JE McGimpsey
    Guest

    Re: 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 <[email protected]>,
    Al Maher <ddd4(pnospam)@hotmail.co.uk> 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. #3
    Bob Phillips
    Guest

    Re: 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" <ddd4(pnospam)@hotmail.co.uk> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1