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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 select column by column name

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
andrewdsto Posted - 09/22/2016 : 02:14:14 AM
Origin Ver. 2016 Pro and Service Release 2 (Select Help-->About Origin):
Operating System: windows 7

Hi
What is the command for selecting/highlight a worksheet column by name in labtalk?
Is there a simple command?

There are multiple ways by index number eg:
wks.colSel(colNum, n)
wks.c1, c2, r1, r2

But I cant find anything based on the short name.
There are a myriad of commands that operate on columns using the short name, but I just want to select/highlight it.


I can write some simple code to do this (loop through columns comparing the short names until I find the one I want then use the index number to select the column)

But I feel I must be overlooking something simple.

I don't want to do anything with the column other than select it. I have other pieces of existing code that later on will open the worksheet and act on the selected column.

Thanks
Andrew
2   L A T E S T    R E P L I E S    (Newest First)
andrewdsto Posted - 09/22/2016 : 02:35:12 AM
perfect thanks
I knew it would be simple.

JokerOne Posted - 09/22/2016 : 02:22:38 AM
I am not sure, if this is what you are looking for:

wks.colSel(ColNum(put_shortname_of_colum_here))

e.g.:

wks.colSel(ColNum(a))

I agree, that this in the end again relies on the the index, but you can just call it using the short name and no loop is required?

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000