Subgenius
2020-09-11T17:06:47Z
My tests show odd results for the column position when trying in moving columns and saving rows

For example, I am trying to
- Remove columns 1 and 7
- Move columns 18, 19, and 20 to 7, 8 and 9
- Save from 7 to end of row to file as row number

  Project1.zip (27kb) downloaded 6 time(s).
Subgenius
2020-09-11T17:15:31Z
I read that the position is changed to another number, so I tried that and it didn't work.


iG1.CellText(iCntr, iG1.ColPos(iCntr2))
hh_9Awo2llYmY.png

Click to View Image10 View(s)

Igor/10Tec
2020-09-11T17:22:48Z
Column indices are never changed. They are in the same order in which you created columns. If a column was moved, its index remain the same, but you can read its new position on the screen with the ColPos property. This property is used to move the column from code.

However, instead of writing your own code to save/restore column positions, why don't use the LayoutCol property for that? It allows you to implement what you need in one statement.
Subgenius
2020-09-11T17:46:50Z
I don't understand how column position works.
Igor/10Tec
2020-09-14T06:39:12Z
I've read the posts you deleted. It seems, you figured out how to use the ColPos() function to operate with columns.

Do you still have any questions regarding this?