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
 select column by column name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

andrewdsto

Australia
Posts

Posted - 09/22/2016 :  02:14:14 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

JokerOne

Germany
58 Posts

Posted - 09/22/2016 :  02:22:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page

andrewdsto

Australia
Posts

Posted - 09/22/2016 :  02:35:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
perfect thanks
I knew it would be simple.

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