Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default #Name? Error in place of function result

New to Excel VBA, old hand at VB, I am having trouble
calling a function from a cell.

What I want to do is update a cell every 2 minutes, where
I plan to use the OnTime method. So I added a function to
the sheet code module but it didn't work there. I then added
a separate module (Module1) and tried it there, but I still get
the #Name? as a response.

It seems the function is not visible from the cell.

What are the steps involved in creating a function that will
be callable from a cell, and, what topic in Help discusses
that task (I couldn't find anything relavent)

LFS


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default #Name? Error in place of function result

How have you coded the function and how are you using it in the cell?
--
Gary''s Student - gsnu200723


"Larry Serflaten" wrote:

New to Excel VBA, old hand at VB, I am having trouble
calling a function from a cell.

What I want to do is update a cell every 2 minutes, where
I plan to use the OnTime method. So I added a function to
the sheet code module but it didn't work there. I then added
a separate module (Module1) and tried it there, but I still get
the #Name? as a response.

It seems the function is not visible from the cell.

What are the steps involved in creating a function that will
be callable from a cell, and, what topic in Help discusses
that task (I couldn't find anything relavent)

LFS



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default #Name? Error in place of function result


"Gary''s Student" wrote
How have you coded the function and how are you using it in the cell?
--
It seems the function is not visible from the cell.


The function is declared in a module like:

Public Function ChangingMessage()
.. code to build message
End Function

And I am trying to call it up from a cell like this:

=ChangingMessage()


But, as I said, what shows in the cell is "#Name?" (or something
similar)

LFS


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default #Name? Error in place of function result

If it had the same Function name when you tried in a Sheet Module, you get the #NAME error.
Try with a new name.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Larry Serflaten" wrote in message ...
|
| "Gary''s Student" wrote
| How have you coded the function and how are you using it in the cell?
| --
| It seems the function is not visible from the cell.
|
|
| The function is declared in a module like:
|
| Public Function ChangingMessage()
| .. code to build message
| End Function
|
| And I am trying to call it up from a cell like this:
|
| =ChangingMessage()
|
|
| But, as I said, what shows in the cell is "#Name?" (or something
| similar)
|
| LFS
|
|


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
why does the dateif function result in an error in Excel 2003? Cheryl Excel Worksheet Functions 5 July 21st 09 08:30 PM
Sum the remaining rows and place the result in the row below the last tahrah Excel Programming 6 January 10th 07 04:26 PM
Function displays as text, doesn't return result or error SK_in_Austin Excel Worksheet Functions 2 March 28th 06 07:22 PM
Rounding error in Stdev function result. David K Excel Worksheet Functions 15 January 12th 06 04:19 AM
VBA Function error and display result in sheet Felicity Geronimo Excel Programming 1 January 10th 05 02:20 PM


All times are GMT +1. The time now is 11:14 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"