I'm using this code to delete all checkboxes below a given top.
No matter what I do, it always leaves one checkbox. It deletes all the others, but always leaves one.![]()
Please Login or Register to view this content.
I'm using this code to delete all checkboxes below a given top.
No matter what I do, it always leaves one checkbox. It deletes all the others, but always leaves one.![]()
Please Login or Register to view this content.
Last edited by foxguy; 08-24-2010 at 05:01 PM.
or![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by shg; 08-23-2010 at 07:47 PM.
Entia non sunt multiplicanda sine necessitate
Hi shg;
I don't want all the checkboxes deleted. Only those that are below a fixed point on the screen. The code I'm using works fine except that there is always one checkbox left below that point.
I found a solution to my problem. I named the checkboxes when I created them with a unique name pattern, then deleted all the checkboxes with that name pattern.
I'm still interested in finding out why my first code doesn't work.![]()
Please Login or Register to view this content.
When you create controls, isn't the first one a count of zero? Have you tried
for i = 0 to ......
Generally better to loop backwards through a collection when deleting. The need for an error handler is a bit of a giveaway.
Everyone who confuses correlation and causation ends up dead.
romperstomper; that's probably it. Don't know why I didn't think of it.
MarvinP - yes I tried from 0 to, didn't make any difference.
Perhaps it is like hiding pages. You can't hide the last page because then you''d have none? Just a stupid guess. Have you treid the immediate window to see which checkbox is still there? Use the index method to see which it is. Maybe this will give you a clue.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks