i have various tables with various columns.
i need to find the beginning position for the last column in my table.
my data always begins in Row 9,Col 14 to Row 9,Col 73.
i was thinking of testing each field by beginning in the last column 73 and testing backwards.
if 9,73 has a value, then continue testing each previous column field until the next blank column.
if 9,73 is blank, then continue testing each previous column field until a column has a value, and then continue until the next blank column.
then the blank column + 1 will be the last column. correct?
how can i test backwards? or is there an easier method?
thanks
zach
i need to find the beginning position for the last column in my table.
my data always begins in Row 9,Col 14 to Row 9,Col 73.
Code:
Sub TestLastCol()
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
For y = 14 To 73
DataField = Trim(Sess0.Screen.GetString(9, y, 13))
Next y
End Sub
i was thinking of testing each field by beginning in the last column 73 and testing backwards.
if 9,73 has a value, then continue testing each previous column field until the next blank column.
if 9,73 is blank, then continue testing each previous column field until a column has a value, and then continue until the next blank column.
then the blank column + 1 will be the last column. correct?
how can i test backwards? or is there an easier method?
thanks
zach