Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3688

Getting the Column Number for a String

$
0
0

I need the column number for two Columns, based on their names.

The names of the Columns (in that case) are:
Date (Start) and Date (End)

I wasted time until:


Var The_Header() As String

// a. Get the Header Strings
The_Header = Split(LB.HeaderAt(ListBox.AllColumns),Chr(9))

// b. Get the Position of Date (Start)
Date_Start_Idx = The_Header.IndexOf("Date (Start)")

// b. Get the Position of Date (Start)
Date_End_Idx = The_Header.IndexOf("Date (End)")

In the code above, LB stands for the ListBox reference.

Now, I can work with the dates stored in these two Columns.

4 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3688

Trending Articles