View Single Post
  #7 (permalink)  
Old 01-25-2010, 09:18 AM
klaus's Avatar
klaus klaus is offline
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,813
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

In the For - Next loop you use the variable 'n' representing the column index. After each RemoveCol the indexes of the columns change, so when for example n=TblD.ColCount-1, this column doesn't exist any more.

Try this code:
For i=Table1.ColCount-1 To 0 Step -1
Table1.RemoveCol(Table1.ColName(n))
Next

In the program I posted in post #5 with:
For i=0 To Table1.ColCount-1
Table1.RemoveCol("Test"&i+1)
Next
it works because I remove the columns by their name and not by their column index.

Quote:
Well I decided to switch to csv files and loadCSV as method.
Then the width of a table is settable then. So I guess it is a bug.
I don't know why you couldn't resize the column width in your program. In the sample program in post #5 it works also with XML files !

Best regards.
__________________
Klaus
Switzerland

Last edited by klaus : 01-25-2010 at 09:22 AM.
Reply With Quote