T O P I C R E V I E W |
HP1740 |
Posted - 05/28/2009 : 05:48:47 AM Hi everyone. here my problem: I want to write a script, that selects every second column (starting with the third in the worksheet), inserts a new column behind every selected one and sets this new columns as Z. so far i only have a script selecting every second column starting with the third one.
toggle = 0; for (ii = 3; ii <= wks.ncols;ii ++) { if (toggle == 0) wks.ColSel(ii,1); toggle = 1-toggle; };
if i type a command after colsel to insert a new column origin wont do it, or actually breaks down. i hope someone can help me. thanks to all
Florian |
1 L A T E S T R E P L I E S (Newest First) |
artem |
Posted - 05/28/2009 : 12:25:50 PM After the columns are selected, you could use this loop:
for (i=wks.c2; i>=wks.c1; i--) {if (wks.iscolsel(i)) worksheet -i i; };
Hope this helps, Tony Pryse |
|
|