Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default #NAME error for user defined functions at workbook startup

For some reason, we keep getting an occassional #NAME error in cells
that contain the user defined function 'rowheight()' created by the
code shown below when we open the workbook in which it resides. It is
important to note that the workbook is a shared workbook. However, the
problem can then be easily corrected by simply pressing F2 on any one
of the #NAME cells and then pressing <Enter. Then excel recognizes
the UDF. But why doesn't it recognize it when we open the workbook,
and what can I do to correct the problem?

Thanks for your help...

Code:
Function rowheight(rng As Range)
Application.Volatile
rowheight = rng.Areas(1).Cells(1, 1).rowheight
End Function

*The code sits alone in Module 1 of the workbook. All other macros are
in Module 2. This is the only UDF in the workbook.

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
#NAME? Error With User Defined Functions Thomas M. Excel Worksheet Functions 7 January 5th 10 01:39 AM
Using user defined workbook name in macro worksheet functions Mark Excel Programming 0 April 6th 05 06:11 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


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