Like this
'---------------------------------------------------------------------
Function ColorIndex(rng As Range, _
Optional text As Boolean = False) As Variant
'---------------------------------------------------------------------
Dim cell As Range, row As Range
Dim i As Long, j As Long
Dim iWhite As Long, iBlack As Long
Dim aryColours As Variant
Application.Volatile
If rng.Areas.Count > 1 Then
ColorIndex = CVErr(xlErrValue)
Exit Function
End If
--
HTH
RP
(remove nothere from the email address if mailing direct)
"DKY" <DKY.21h99q_1136994904.0728@excelforum-nospam.com> wrote in message
news:DKY.21h99q_1136994904.0728@excelforum-nospam.com...
>
> I put it right after the line
>
> Code:
> --------------------
> Function ColorIndex(rng As Range, _
> Optional text As Boolean = False) As Variant
> --------------------
>
> Is that the right place to put it? I'm thinking not because the F9
> isn't working.
>
>
> --
> DKY
> ------------------------------------------------------------------------
> DKY's Profile:
http://www.excelforum.com/member.php...o&userid=14515
> View this thread: http://www.excelforum.com/showthread...hreadid=499846
>
Bookmarks