M
Malcom Jazz
I tried to create the cell colour index function but it
gives #NAME? error.
Function CCOL(cell As Range) As Integer
Application.Volatile = True
CCOL = cell.Interior.ColorIndex.Value
End Function
Then I searched and copied function from the Chip's page
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the
Interior
' (background) of a cell, or, if OfText is true, of the
Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1,1).Font.ColorIndex
Else
CellColorIndex = InRange(1,1).Interior.ColorIndex
End If
End Function
This also gives the same error.
It means there is an obvious error or some setting needs
to be changed on my Excel. I am using Excel 2000.
Can somebody tell me whats wrong with it?
Thanks,
Malcom
gives #NAME? error.
Function CCOL(cell As Range) As Integer
Application.Volatile = True
CCOL = cell.Interior.ColorIndex.Value
End Function
Then I searched and copied function from the Chip's page
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the
Interior
' (background) of a cell, or, if OfText is true, of the
Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1,1).Font.ColorIndex
Else
CellColorIndex = InRange(1,1).Interior.ColorIndex
End If
End Function
This also gives the same error.
It means there is an obvious error or some setting needs
to be changed on my Excel. I am using Excel 2000.
Can somebody tell me whats wrong with it?
Thanks,
Malcom