LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default workbook startup creates #NAME error for UDF

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? 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.

Thanks for your help...

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

 
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
Spacebar creates value error Dennis1188 Excel Discussion (Misc queries) 5 March 4th 07 04:58 PM
#NAME error for user defined functions at workbook startup [email protected] Excel Programming 0 December 1st 06 04:18 PM
Combobox creates error Stephen Excel Worksheet Functions 0 January 23rd 05 10:55 AM
workbook creates desktop shortcut...HELP daredevil Excel Programming 0 November 13th 03 01:53 AM
Delete creates error during Change event Random Excel Programming 4 August 28th 03 08:37 AM


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