The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Origin Wks Naming
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kid

USA
20 Posts

Posted - 08/02/2002 :  6:16:16 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

kid

USA
20 Posts

Posted - 08/05/2002 :  10:34:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
yes thank you Mike
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000