Try adding:
Application.volatile
to the top of the procedu
Function TOTAL_VISIBLE(rng As Range) As Long
application.volatile
.....
This tells excel to recalculate the function whenever excel recalculates.
If I recall correctly, some versions of excel won't recalc when columns are
hidden/unhidden--maybe all versions??? (Changing the columnwidth--not
hiding/showing--causes a recalc in xl2003, though.)
So for UDFs like these, you'll want to force a recalc before you trust the
results.
starguy wrote:
what should I do now...problem persists.
--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=537953
--
Dave Peterson