I'm starting to distill myself...

Cableguy

Expert
Licensed User
this is driving me KKRRAZY!!!:sign0137:

I have started a new game project, in wich to keep control of things, I am defining the row/col count of a table control, according to user difficulty selection....

I start by using a for...next cycle to delete the existing rows/cols of the table and then add row/col according to user selection...so far so good, well not so...If there is no rows or cols in the table before user selection (i.e: when he app is first started) it works fine, but if there is already a number of rows/cols I keep getting an "index canot be negative" sort of error...

I added msgboxs to each of my for next loops and it seems ok....
Im first deleting rows and then collumns, shoul I invert?
Both counts start from "0" Right?
 

specci48

Well-Known Member
Licensed User
Hi Cableguy,

Both counts start from "0" Right?
Yes, you're right!

To solve your problem, I think some posted code would be nice because your description sounds good so we might take a look at your current solution to find out the problem...


specci48
 

moharj

Member
Licensed User
delete col and rows

you can go in the reverse order of the for next
deleting the last one all the way down....:)
 

Cableguy

Expert
Licensed User
I'll give my guess.
BTW, why don't you use Table1.Clear?
Right to the point as usual, Erel.

That was exactly what I was trying...

you can go in the reverse order of the for next
deleting the last one all the way down....
I also tried that aproach and it error even more often....

The clear property has some how iluded me as I started exactly by seaching for that aproach instead of "manually" delete the rows/cols...

And they say I'm an Expert, yah, right...:sign0161:
 
Top