I have the following Excel Macro:
**************************************************
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
***********************************************************
The problem is that i can't compile it, when i try to compile appear
a pop up windows to select a Macro name.
I can't compile or use Sub with parameters in my Excel MAcros.
Could you help me?