View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dallman Ross Dallman Ross is offline
external usenet poster
 
Posts: 390
Default Inexplicable VBA errors in formulas

In , Dallman Ross <dman@localhost.
spake thusly:

In .com, Dave O
spake thusly:


my guess is somewhere along the line certain cells are pasted
and the references shift accordingly. Some debugging will be
required to figure this out: can you post the entire routine?


Basically, relative references that my VBA code produce to
populate cells (whether the cells themselves or conditional
formatting formulas) no longer work right for me in this
workbook. [. . .]


I've tested things more by removing the long named expressions
from the Names Manager and performing a couple of other tests.
That was not the problem. The references shift each time
the code is run. If I close the book and re-open and run
again, it moves back to the beginning. But the strange
"II:II" references (that you called "eye-eye") are still there,
and the conditonal-format formulas won't work until I change
those to B:B (manually). And when I run the code again
the relative references shift out of sync, and I get
a dozen or so extra blank columns on the right end of
the sheet. (See "kludge" in my code.)

Maybe where I have "clear" (for the cells on the sheet)
I will need to delete. But then my named expressions
lose their references and have them replaced by error messages.


I'll put the whole thing on a web page and leave it up for a
couple of weeks at least. Okay, the macro is at

http://heliotropos.com/xl/tmp/deBruinMerge.txt

If you search on

' data validation

or even just "validation" in there, you'll find the snippet I
posted in the previous message.

The worksheet the VBA produces looks like this example:

http://heliotropos.com/xl/tmp/OpenOrders.jpg


Dallman