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
 Changing the active book
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hasdur

France
1 Posts

Posted - 03/15/2012 :  06:41:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I'm looking for a way to change the active book. I program some script, but my first issue is when I need a newbook, the newone became active. In this way, the end of my script can't be effective in the first book.

To summarize, I'm looking for a way to create a newbook and let the first book active, or choose the active book.

Thanks for your help

Penn

China
644 Posts

Posted - 03/15/2012 :  09:16:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use the script below:

string firstBookName$ = %H;  // get the name of current book
newbook;  // create a new book
win -a %(firstBookName$);  // activate the first book


Penn
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/22/2012 :  12:45:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
just a tip for readers of this thread who might be interested in....

If you want to make a new workbook with the same structure to the original - with same number of sheets, sheet names, column names comments, etc., maybe the just the following two lines may be quickest and easiest:

save -t %H %Y\temp;
win -t wks %Y\temp;

--Hideo Fujii
OriginLab
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