Moving a local name to another sheet
Patrick and Bony Pony, I have a particular reason for cut and paste
(basically to refresh the sheets, to clear Excel's internal cache,
resulting in a significant reduction in file size - from 40MB to
15MB).
The problem is that when a the contents of a worksheet are cut and
pasted to a new worksheet, the name still belongs to the old sheet
while its RefersTo property belongs to the new sheet. So deleting the
old sheet leaves the name with a #REF error.
My code addresses this problem, but I've detected another problem
which is similar: A global name that has a relative address (relative
column OR relative row OR both) behaves like a local name with cut and
paste. My code above doesn't work with these, because they are not
local names. I'll have a go at this.
|