<div>Ok, </div><div><br></div><div>thanks for your advice. I will rework it but suggest that the static method will be placed in ScDBCollection.<br></div><div><br></div><div>But there is then there is the question whether an Undo should undo the last change in the active sheet or undo the last change in any sheet. Note that ,as I see it, this will only affect changes that were made with anonymous db ranges. </div>
<br><div class="gmail_quote"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Probably yes.  The idea is to replace the concept of one global<br>
anonymous DB name with one anonymous name per sheet *across the calc<br>
code*, so we need to make changes in every place where the global<br>
anonymous name is used currently.  After this change, we will no longer<br>
have a global anonymous name anymore (except for backward compatibility<br>
handling in the import code, perhaps).<br>
<br>
With that in mind, let&#39;s create a central method that generates<br>
sheet-local anonymous names, and use it everywhere.  If I were you I<br>
would create a static method inside ScDPCollection class for that.<br>
<div class="im"><br></div></blockquote><div><br></div><div>Yes, I tested that. It seems that nTab is a property of ScTable and not used to determine the sheet&#39;s Position.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
BTW, how does this handle sheet position changes?  For example, let&#39;s<br>
assume you have two sheets with auto filter applied (hence two<br>
sheet-local anonymous DBs), and you swap their position.  Would the DB<br>
ranges be still valid?<br>
<font color="#888888"><br></font> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
Kohei<br>
<br>
</font></blockquote></div>Markus<br>