.CurrentRegion in Excel functions

  • Thread starter Thread starter Tim Lund
  • Start date Start date
T

Tim Lund

I have some code in a function that includes a line

set r = r.currentregion

But it doesn't work - r remains r, even when there are
contiguous cells to it. Any ideas why?

Tim Lund
 
UDF's (User Defined Functions - VB functions called from a worksheet cell)
cannot perform "actions" (select a cell, do formatting, save a file, etc).
Unfortunately .CurrentRegion is seen as an action by Excel. It seems that,
internally at least, Excel is doing a selection.
 
Back
Top