T O P I C R E V I E W |
gaubitzer |
Posted - 09/10/2002 : 12:24:18 PM Hi
I'm having a problem with the properties of my worksheet. I used a script for setting the type of a column. It worked 2 or 3 times and afterwards the mentioned properties were missing
Output wks.col2.name$=; WKS.COL2.NAME$=--
I'm using Origin 6.1. and the worksheet is rather large (about 11MB). The script was using this loop to find the wanted column (script from another topic in this forum)
%A=Zeit; loop (ii,1,wks.ncols) { %B=wks.col$(ii).name$; if("%B"=="%A") break; }; worksheet -t ii 4;
Can anyone tell me what has happened?
Thank you
|
3 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 09/10/2002 : 4:13:02 PM Where is the script? This script assume the worksheet as the active window. Maybe you are running this script and in that context the worksheet is not the active window? In that case, you will need to use things like win -o myWksName {....}
CP
Edited by - cpyang on 09/10/2002 4:13:20 PM |
Mike Buess |
Posted - 09/10/2002 : 1:16:59 PM Also, you will always get a null result if you try to access a text property with object.textproperty$=;. You need to do assign it to a text variable as you've done in your loop...
%B=wks.col2.name$; %B=;
...Which brings us back to the question of why your script doesn't work. I can see nothing wrong with it and it works when I try it.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 09/10/2002 1:28:59 PM |
cpyang |
Posted - 09/10/2002 : 12:41:04 PM There is no need to loop through all the columns to find a column position, just use the function colnum, like ii=colnum(Zeit); worksheet -t ii 4;
CP
|