468,491 Members | 2,042 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,491 developers. It's quick & easy.

Remove ALL items from ListView?

rdi
Why does the following NOT remove the items from the ListView? I need to
remove all the items and re-build the LV based on new information.

Thanks.

--

RDI

(remove the exclamation from the email address)

If lvwFilter.Items.Count > 0 Then

For k = lvwFilter.Items.Count - 1 To 0

lvwFilter.Items.RemoveAt(k)

Next

End If
--

RDI

(remove the exclamation from the email address)
Nov 20 '05 #1
4 4468
rdi
never mind. It's happened again. Lately it seems as though just taking the
time to try and explain my problem to you guys quite often leads me to the
answer.

I changed For k = lvwFilter.Items.Count - 1 To 0

to For k = lvwFilter.Items.Count - 1 To 0 Step -1
--

RDI

(remove the exclamation from the email address)

"rdi" <rd**@writeme.com> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...
Why does the following NOT remove the items from the ListView? I need to
remove all the items and re-build the LV based on new information.

Thanks.

--

RDI

(remove the exclamation from the email address)

If lvwFilter.Items.Count > 0 Then

For k = lvwFilter.Items.Count - 1 To 0

lvwFilter.Items.RemoveAt(k)

Next

End If
--

RDI

(remove the exclamation from the email address)

Nov 20 '05 #2
rdi
never mind. It's happened again. Lately it seems as though just taking the
time to try and explain my problem to you guys quite often leads me to the
answer.

I changed For k = lvwFilter.Items.Count - 1 To 0

to For k = lvwFilter.Items.Count - 1 To 0 Step -1
--

RDI

(remove the exclamation from the email address)

"rdi" <rd**@writeme.com> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...
Why does the following NOT remove the items from the ListView? I need to
remove all the items and re-build the LV based on new information.

Thanks.

--

RDI

(remove the exclamation from the email address)

If lvwFilter.Items.Count > 0 Then

For k = lvwFilter.Items.Count - 1 To 0

lvwFilter.Items.RemoveAt(k)

Next

End If
--

RDI

(remove the exclamation from the email address)

Nov 20 '05 #3
On 2004-04-10, rdi <rd**@writeme.com> wrote:
never mind. It's happened again. Lately it seems as though just taking the
time to try and explain my problem to you guys quite often leads me to the
answer.

I changed For k = lvwFilter.Items.Count - 1 To 0

to For k = lvwFilter.Items.Count - 1 To 0 Step -1


Can't you just call lvwFilter.Items.Clear?

--
Tom Shelton [MVP]
Powered By Gentoo Linux 1.4
"There was a point to this story, but it has temporarily
escaped the chronicler's mind."

- This line perhaps best sums up the whole book.
Nov 20 '05 #4
On 2004-04-10, rdi <rd**@writeme.com> wrote:
never mind. It's happened again. Lately it seems as though just taking the
time to try and explain my problem to you guys quite often leads me to the
answer.

I changed For k = lvwFilter.Items.Count - 1 To 0

to For k = lvwFilter.Items.Count - 1 To 0 Step -1


Can't you just call lvwFilter.Items.Clear?

--
Tom Shelton [MVP]
Powered By Gentoo Linux 1.4
"There was a point to this story, but it has temporarily
escaped the chronicler's mind."

- This line perhaps best sums up the whole book.
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by rdi | last post: by
6 posts views Thread by Nick | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.