View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Javed Javed is offline
external usenet poster
 
Posts: 91
Default Q: UDF with Interior.colorindex Help needed

Function MyInterior(Optional Rng As Range) As Integer

Application.Volatile

If Rng Is Nothing Then
'This line must be in single line
MyInterior = Application.ThisCell.Interior.ColorIndex
Else
'This line must be in single line
MyInterior = Rng.Interior.ColorIndex
End If

End Function

Pls confirm