Hello,
I am using Excel2000 on a windowsXP machine. I have the following function.
Public Function testing(dataRange As Range)
Dim cell As Range
For Each cell In dataRange
cell.Interior.ColorIndex = 8
Next cell
End Function
The function works fine when it is used with the 'call' statement within a macro ie like the test subroutine below.
Sub test()
Call testing(ActiveSheet.Range("k1:k10"))
End Sub
When I call the function from a cell in excel eg in cell a1 I have the formula "=testing("k1:k10")". The cells are not colored.
Has somebody else found this problem?
thanks in advance
ausch
I am using Excel2000 on a windowsXP machine. I have the following function.
Public Function testing(dataRange As Range)
Dim cell As Range
For Each cell In dataRange
cell.Interior.ColorIndex = 8
Next cell
End Function
The function works fine when it is used with the 'call' statement within a macro ie like the test subroutine below.
Sub test()
Call testing(ActiveSheet.Range("k1:k10"))
End Sub
When I call the function from a cell in excel eg in cell a1 I have the formula "=testing("k1:k10")". The cells are not colored.
Has somebody else found this problem?
thanks in advance
ausch