#1   Report Post  
Ray A
 
Posts: n/a
Default UDF trouble

Hi
I have 2 user defined functions in my personal workbook.

Function GetFontColor(mycell As Range)

GetFontColor = mycell.Font.ColorIndex

End Function

Function GetFillColor(mycell As Range)

GetFillColor = mycell.Interior.ColorIndex

End Function

I have entered these formuilas
=getfillcolor(A1)
=getfontcolor(A1)
Both result in the #Name? error. What is the problem?
TIA
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Use:

=Personal.xls!GetFillColor(A1)

By default, Personal.xls is just a regular (though hidden) workbook, so
you need to use the workbook name.

Add-ins don't require the workbook prefix.



In article ,
"Ray A" wrote:

Hi
I have 2 user defined functions in my personal workbook.

Function GetFontColor(mycell As Range)

GetFontColor = mycell.Font.ColorIndex

End Function

Function GetFillColor(mycell As Range)

GetFillColor = mycell.Interior.ColorIndex

End Function

I have entered these formuilas
=getfillcolor(A1)
=getfontcolor(A1)
Both result in the #Name? error. What is the problem?
TIA

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
Time Sheet for my org Im still having trouble Jesse_Norris Excel Discussion (Misc queries) 4 July 30th 05 06:28 AM
Having trouble totaling columns in excel 2003, always worked b4 rjmac Excel Worksheet Functions 1 June 24th 05 07:01 PM
I have had trouble with textbox text to worksheet Thomas Excel Discussion (Misc queries) 1 March 10th 05 03:23 AM
Trouble opening an Excel file that contains macros JohnR Excel Worksheet Functions 1 March 8th 05 08:09 PM
Trouble with Dates between 2 seperate worksheets Julie Excel Discussion (Misc queries) 3 March 4th 05 07:57 PM


All times are GMT +1. The time now is 04:51 PM.

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

About Us

"It's about Microsoft Excel"