Author |
Topic  |
|
kid
USA
20 Posts |
Posted - 08/02/2002 : 6:16:16 PM
|
I notice that when you create a new wks win in the origin (win -t type template) the name assign to this win do not depend on how many wks windows you have in the active project, but how many you have created so far. Is like this. If I create a wks win, Data12, then create some other, Data13, but if I delete Data12 and create another wks win the name assign to this last wks win, is Data14, not Data12.
With the graph win is not this way. If I have Graph2 and Graph3 and delete Graph2 and create another graph win the name of this new win is Graph2.
How could I make the wks win naming system, smart like the graph win naming system? Cause I run into problems when I try to create the wks Data257, when I only have 30 actual wks.
Alex... |
|
Mike Buess
USA
3037 Posts |
Posted - 08/05/2002 : 4:52:03 PM
|
Hi Alex,
The way I've done that for years is with a macro that finds finds the smallest value of N for which the worksheet DataN does not exist...
getWksName { for(j=1;j>0;j++) {if(exist(Data$(j),2)==0) break}; };
Example...
getWksName; win -t Data Data$(j);
Hope that helps.
Mike Buess Origin WebRing Member |
 |
|
kid
USA
20 Posts |
Posted - 08/05/2002 : 10:34:26 PM
|
yes thank you Mike |
 |
|
|
Topic  |
|
|
|