Thread: UDF trouble
View Single Post
  #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