The first one works because the Sub doesn't attempt to change any
property of Excel.
"Willot"
wrote in message
...
HOW COME THIS WORKS?
if I place this formula in a cell
=IF(A1 < "",ResetFont())
And in Module1 the Subroutine is
Sub ResetFont()
msgBox(ActiveCell.Value)
End sub
BUT THIS DOESNT?
Sub ResetFont()
ActiveCell.Font.Size = 10
End sub
ALSO IF I TRY
Sub ResetFont()
ActiveCell.Value = "1"
End sub
*It throws an error in the cell with the =IF(...?*
--
Willot
------------------------------------------------------------------------
Willot's Profile:
http://www.excelforum.com/member.php...o&userid=35166
View this thread:
http://www.excelforum.com/showthread...hreadid=549742