Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear all ListViews in a project 2

Status
Not open for further replies.

vvlad

Programmer
May 27, 2002
151
DE
Hi,

is there a quick way to clear all ListViews in a project, no mather in which form they are?

Thanks,

vlad
 
At runtime or in the IDE?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 

Do you mean at runtime, clearing the ones in all loaded forms?

Dim frm as Form
Dim ctl As Control

for each frm in Forms
For each ctl in frm.controls
If (Typeof ctl Is ListView) then
'using ctl as a reference to the ListView, do what you want here
End If
next ctl
Next frm

Or, do you mean ones that were defined and filled at designtime?
 
No worries [smile]

That's the way I was going to go, you just got it all in one post [wink]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Hi,

at runtime, thanks to both of you, that's exactly what I need.

vlad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top