Click to See Complete Forum and Search --> : msflexgrid


John F.
April 2nd, 2001, 03:59 AM
Hello, I am trying to write an application using msflexgrid and I need to be able to delete columns. I know that the removeitem deletes rows but I cannot figure out how to delete a column.

any help would be much appreciated,

kind regards,

John F.

cksiow
April 2nd, 2001, 04:15 AM
you can look at the Cols property.

for instance if you got three col now and want only 2,

MSFlexGrid1.Cols = 2

hope this help.

cksiow
http://vblib.virtualave.net - share our codes

John F.
April 2nd, 2001, 04:23 AM
Sorry, I should have been more explicit in my explanation of what I wanted. I need to be able to delete a selected column. If I use the cols property only the last row will be deleted.

John F.

cksiow
April 2nd, 2001, 04:50 AM
I am not sure whether there got any method to do so. however, you can create another msflexgrid and transfer all data to the new one and erase the first msflexgrid, though dump, but it might work.

let me know if you find out how to solve this.

John F.
April 2nd, 2001, 05:24 AM
Thanks very much for the help, but I have the problem solved. I set up two loops to copy the data from the column next to the one to be deleted into the one to be deleted, and so on until the last column, and then just deleted the last column. It seems to be working okay

kind regards,

John F.