Ron Rosenfeld used his keyboard to write :
On Tue, 17 Jan 2012 09:50:43 -0500, GS wrote:
Ron,
The function is NOT designed to be used as a worksheet function, but
rather by VBA as follows...
If Not StripDupes Then MsgBox "Error!" Else RunSomeOtherCode
--
Garry
My understanding is that doesn't matter. Your Function is still trying to
modify worksheet cells, and that is probably where the error is coming from.
Do you actually see the worksheet cells being written to when you run that
function?
My understanding of a function is that it's used when a return is
needed. There is no difference, otherwise, between a function and a
sub.
My understanding of a UDF is that it can't modify cells if called from
a worksheet cell formula. This definitely DOES NOT apply to VBA
functions called by VBA procedures (function or sub).
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc