![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
When removerow is done doing it's job is it suppose to do the next line of code after it or go back to the begining of the sub it's in?
Sub Table1_SelectionChanged (ColName, Row) iRow = Row ' Msgbox(row) txtx1.Text = table1.Cell("x1",iRow) txty1.Text = table1.Cell("y1",iRow) txtx2.Text = table1.Cell("x2",iRow) txty2.Text = table1.Cell("y2",iRow) txtr.Text = table1.Cell("r",iRow) z = table1.Cell("Header",iRow) ^ i i i most of the time not all it goes back to the beginning of this sub. Sometimes it follows by doing the rest of the code behind it. table1.RemoveRow(iRow) mnulabel1.Text = table1.RowCount - 1 DeleteSegment Drawing End Sub dennishea edit: oh almost forgot and sometimes it doesn't wait for you to prompt it for next line of table it wipes out the whole table. Last edited by dennishea : 12-22-2007 at 02:43 PM. |
|
|||
|
Thanks agraham. Now I have a direction to go in and as I type this out I think I have a solution. Whoops sorry for think typing gotta go try my thoughts out. Agian thanks agraham.
dennishea edit: Well that was a bust. I moved this code table1.RemoveRow(iRow) mnulabel1.Text = table1.RowCount - 1 DeleteSegment Drawing out of there and it didn't do it. After further investigation I descovered that I can delete any row singulerly and it seems to work as intended, but and here's the but if I try to delete the last entered row that's when it goes whole hog rotates through and deletes them all. What I tried to do was create another sub, move those lines of code to it, but when it goes into it's loop thing it leaves the transfer sub after completeing removerow, doesn't do the rest of the code in the transfer sub and goes back to the event sub and continues going back and forth between those two sub's excluding the code after removerow, deleting the rest of the rows. edit2: I'm not sure if this is good or not but for the moment it seems to work. If iRow < count Then count = table1.RowCount Return End If Last edited by dennishea : 12-22-2007 at 06:58 PM. |
|
||||
|
You could try this but I can't guarantee it will work as I haven't tested it.
Code:
Sub Globals InSelChgd = false End Sub Sub Table1_SelectionChanged (ColName, Row) If InSelChgd Then Return InSelChgd = true ... table1.RemoveRow(iRow) ... InSelChgd =false End Sub |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Addrow like removerow(index) | Vito | Questions & Help Needed | 3 | 02-04-2008 02:09 PM |