Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Remove Items From List Box


why does when adding items to a list box all items are added according to index increment, but when items are removed only even items are removed????


thanks for your help

dave ...this is the code

Private Sub Command1_Click()
Dim Entry, i, Msg ' Declare variables.
Msg = "Choose OK to add 100 items to your list box."
MsgBox Msg ' Display message.
For i = 1 To 100 ' Count from 1 to 100.
Entry = "Entry " & i ' Create entry.
Debug.Print Entry & " "
List1.AddItem Entry ' Add the entry.

Next i
Msg = "Choose OK to remove every other entry."
MsgBox Msg ' Display message.
For i = 1 To List1.ListCount ' Determine how to


Debug.Print List1.ListIndex

Debug.Print List1.ListIndex
List1.RemoveItem (i)

Next i ' item.


Msg = "Choose OK to remove all items from the list box."
MsgBox Msg ' Display message.
List1.Clear ' Clear list box.

End Sub




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
LIST BOX HELL. Please Save, Remove Items, Many List Boxes...one Last Name
ok, so the code so far, or as much as you need to see, is
****************************
***************************
***************************
***************************
***************************

Sub LoadCal()
Dim gdtDate As Date
Dim i As Integer
Dim x As Integer
Dim startDay As Integer
Dim giMaxDays As Integer

' clear list boxes before filling again
For i = 0 To 41
List1(i).Clear
Next

' * * * * * * * * * * * * * * * * * * * * * *
' * * * * * ADD DAY NUMBERS * * * * *
'label at top of form
Label1.Caption = MonthName(giMonth) & " " & giYear

'this is the current date
gdtDate = CDate(giMonth & "/01/" & giYear)

'minus one so the first line is never completely empty
startDay = Weekday(gdtDate) - 1

'the number of days in this month
giMaxDays = Day(DateAdd("m", 1, gdtDate) - 1)

'populates list boxes with days
x = 1
i = startDay
While i < (giMaxDays + startDay)
List1(i).AddItem (x)
x = x + 1
i = i + 1
Wend

' * * * * * * * * * * * * * * * * * * * * * *
' * * * * * ADD NAMES TO DAYS * * * * *

' !!!!!!!!!!!!!!!!!check to see that list is not empty !!!!!!!!!!!
If lstAgentList.ListCount = 0 Then GoTo done
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

'agent list counter, "at which item" index
x = -1
'populate list boxes from the first day of the month with numbers
i = startDay
'counter for number of days until sunday
a = startDay - 1

'from the first day to the last day
While i < (giMaxDays + startDay)
If a < 6 Then
'a maximum of 3 names per day
While (List1(i).ListCount) < 4
' if there are no more items in the items list ('x' is greater than counter)
If x < (lstAgentList.ListCount - 1) Then
x = x + 1
' otherwise set it back to 0 (zero)
Else
x = 0
End If
'add the next name from the established agent list
List1(i).AddItem (lstAgentList.List(x))
Wend
a = a + 1
Else
'a maximum of 3 names per day
While (List1(i).ListCount) < 4
'add the next name from the established agent list
List1(i).AddItem (lstAgentList.List(x))
'here we do not increment name for it is a sunday
Wend
'reset 7 days until sunday counter
a = 0
End If
'increment day count
i = i + 1
Wend

done:
' end
End Sub



***************************
***************************
***************************
***************************
now see the shaddy thing with this is...well, it's a calendar month see, and every day is a list box....first item, the date, 1st, 2nd, 3rd, 4th, and so on...each list box can hold that first item, the date, plus 3 names.

if someone double clicks on one of those names (which are populated through other methods...not important) i want that name to be deleted...now where i am out of ideas is: how do i delete one item from one list when my list (List1) is an array of about 41 list boxes all named List1 (x) see....

also if I wanted that name which was double click to delete itself through the entire month, then ....well...the rest is my own trouble...but so far i can't seem to be able to delete.

grrr.
...

thanks in advance,
-munchkin

List Box (Remove Items)
I have a listbox in which I load mp3's for an mp3 player, i also have a "Remove" button on my form, how would I remove JUST the selected song from the list, and not the entire list?? Thanks again!

List Box, Remove Items 1 By 1
I am using a progress bar with a list box. The plan was to have the progress bar move along as the items in the list box were deleted (the program has to go through other steps before removing an item, and this task can take a while to complete). Anyways, this is what I have to remove the items from my list box, however, it only seems to remove the even number items and leave other items in the list box:
Code:
For i = 0 To List1.ListCount - 1
    List1.RemoveItem i
Next i

Check Box To Remove Items From List?
I have made this progam that picks random things from two lists and displays them on a form. I was wondering if there is a way i can have it so when i check a check box labled one of the items in one of the lists will not show up anymore.

How Do I Remove Empty Items From A List Box?
How do i remove empty items from a list box?

Thanx

Access 2002 - Remove Multiple Items In A List Box (Resolved)
In Access 2002, does anyone know the best method for removing selected items from a Multi-Select ListBox?

On my Form, I have one Multi-Select ListBox and one button that allows the user to delete the selected item(s) from
the ListBox. In my "btnRemoveTo_Click" event, I have tried the following 2 methods to remove the selected items from the list box. However, in my looping routine, when I issue the .RemoveItem command, all the items that were selected in the Multi-Select list box, become unselected, thereby leaving no items selected. For instance, if the user has 5 items selected, the first time the .RemoveItem code is issued the first item selected is Removed from the list box, but after that, all the items become deselected, leaving me with no items selected - therefore no other items are removed.

Code:Private Sub btnRemoveTo_Click()
Dim vItem As Variant, iRow As Integer
' Remove all the items selected from the list box.
With Me
    If .listSendTo.ItemsSelected.Count = 0 Then
        Exit Sub
    Else
        ' METHOD #1
        For iRow = .listSendTo.ListCount - 1 To 0 Step -1
            If .listSendTo.Selected(iRow) Then .listSendTo.RemoveItem iRow
        Next

        ' METHOD #2
        'For Each vItem In .listSendTo.ItemsSelected
        ' .listSendTo.RemoveItem vItem
        'Next
    End If
End With

End Sub


edit:: marked as resolved.



Edited by - Metallisoft on 5/19/2004 4:24:24 PM

Saving Items (selected Items) In List Box To A Text File
I need help in coding the following:

1. Saving (or exporting) the items displayed in List Box to a text file.

2. I have a long list of data to be displayed. When I use this List box all of my data does not fit into the width. I was wondering if there is similar other way where I can do horizontal as well as vertical scrolling. I tried text box and its of no help i guess.

Remove Items
Is there a way that when I enter things into a ListBox and by mistake I enter one wrong can I remove it by typing in, in another TextBox the thing I just entered and hitting a CommandButton that will remove what was entered into the TextBox?

Or do you know of an easier way to remove an Item from a list of items in a ListBox?

Thanks

How To Remove Items From App Log File ?
Hello all,

I am using the App Loging feature to create a log file for logging events in my program. Everything is working fine except it's logging some additional stuff that I do not want nor have asked for;

Here's My Simple Code....
________________________________________________________________
Private Sub Form_Load()

Dim MyTime = Now()

' Sets App Event log path. Arg.2 forces logging to this path & File

App.StartLogging "E:Log.Txt", 2

'Log event writes MyTime & Message to E:Log.text. Required 2nd Arg. 4 specifies it's information

App.LogEvent MyTime & " Program Started", 4 '
'
End Sub
__________________________________________________________________


And Here's what the output looks like in my "Log.Txt" file.....

Information Application E:Log.Txt: Thread ID: 2100 ,Logged: 3/11/2005 6:01:44 PM Program Started


Here's What I want......

3/11/2005 6:01:44 PM Program Started


But I am willing to settle for this......

3/11/2005 6:01:44 PM Program Started :Information Application E:Log.Txt: Thread ID: 2100 ,Logged


Any Ideas or Suggestions?


Thanks.

Remove Listbox Items
Is it possible to remove items from listbox by giving item's name not it's index?
I mean if listbox has items Cat, Dog and Cow then what should I do if I want to remove item Dog, but not knowing what index it has?

How To Remove Items From A ComboBox?
Without knowing the number of items in it?

Thanks,

Guy.

Remove Combo Items
i need to remove items in a combo box that already exist in the list but im not sure how. i thought this code i wrote last night would work, but it doesnt, and i cant figure out why. any ideas?



Code:
For b = 1 To cboRecent.ListCount
'c is the array index
c = b - 1
'd is a value linked to c array index
d = cboRecent.List(c)
'nested for to find a match between d & the other items
For e = 1 To cboRecent.ListCount
f = e - 1
If cboRecent.List(f) <> d Then
'add item to list
cboRecent.AddItem (RECENTLIST)
End If
Next e
Next b

Remove Same Items From Two Listboxes!
i wanted to know an effective way to remove same items from two listboxes

for example in the same list box i have


1
2
4
5
6

and in the second
2
3
8
9
0
in this case i wanted 2 to be removed from one of the listbox!

please if u know anything help me!

Remove Items From 2 Lists
Hi, this forum has proved successful for me in the past so I thought Id give it a go.

I need help with code that will remove items from 2 lists.

For example when somebody clicks in the 1st item of List1 then clicks delete the 1st item in List1 and List2 will be deleted. If they click the 2nd item is List2 then click delete the 2nd item in List1 and List2 will be removed.

Please Help!

Remove Items From ListBox!
A VB6 project has 2 Forms named frm1 & frm2. Both the Forms have a ListBox named ListBox1 & ListBox2 respectively. Assume that the ListBox in frm1 is empty. When a CommandButton is clicked in frm1, frm2 loads.

The ListBox in frm2 lists country names from a text file. Users can select multiple items from ListBox2. After selecting items from ListBox2, when a OK CommandButton in frm2 is clicked, 3 things happen:

1. frm2 unloads & frm1 gets activated
2. the selected items in ListBox2 get deleted
3. those deleted items get added to ListBox1 in frm1

This is how I am doing it:
VB Code:
[u]code in [i]frm2[/i][/u]Private Sub cmdOK_Click()    Dim i As Integer     For i = ListBox2.ListCount - 1 To 0 Step (-1)        If (ListBox2.Selected(i) = True) Then            [b][color=red]frm1[/color][/b][color=red][/color].ListBox1.AddItem ListBox2.List(i)            'MsgBox ListBox2.List(i)            ListBox2.RemoveItem (i)        End If    Next i     'MsgBox frm1.ListBox1.ListCount    Unload MeEnd Sub
The problem I am facing is the selected items in ListBox2 get deleted & frm2 also unloads but the items deleted from ListBox2 don't get added to ListBox1 which exists in frm1.

I even debugged the code by stepping over each & every line; the code flow turned out to be exactly what I wanted but I don't understand why the deleted items from ListBox2 aren't getting added to ListBox1.

In order to further debug the code, I added the 2 MsgBox lines which are commented. Now if I select say India, Japan & China from ListBox2 & click the OK CommandButton in frm2, then the first MsgBox, as expected, shows India, Japan & China. The second MsgBox also correctly shows the ListCount of ListBox1 as 3!

What am I doing wrong here?

This is how I am invoking frm2 when a CommandButton is clicked in frm1:
VB Code:
[u]code in [i]frm1[/i][/u]Private Sub cmdAdd_Click()    Dim frm As frm2    Set frm = New frm2    Call frm.ShowMe(Me)End Sub [u]code in [i]frm2[/i][/u]Private frmOwner As FormPublic Sub ShowMe(OwnerForm As Form)    Set frmOwner = OwnerForm    Me.Show vbModeless, frmOwner    frmOwner.Enabled = FalseEnd Sub
I also added this small code snippet in frm1 to further debug the app:
VB Code:
Private Sub Form_Activate()    MsgBox ListBox1.ListCount    MsgBox Me.ListBox1.ListCount    MsgBox frm1.ListBox1.ListCountEnd Sub
Strangely after selecting 3 items from ListBox2, when frm1 gets activated, the first 2 MsgBox's wrongly show the ListCount of ListBox1 as 0 but the third MsgBox correctly shows the ListCount of ListBox1 as 3!

Why this eccentricity?

Remove All Items In Listbox.
How can I remove all items in a text box, i'm guessing its going to use a loop.

Clearing Add/Remove Items
I am trying to make my own setup1.exe

I've been modifying the original setup1.vbp.

Most of it works fine.

When i install the program and remove it , the item is still visible in the Add/Remove Programs section.

Everything is removed except it is still visible in this.

Can anyone tell me how I can make it so these items are removed also.

Advanced thanks

Remove Items From Listbox
I need to remove items from the listbox after they have been entered.
the list looks like this:

Book (30)
Orange (20)
Blanket (-10)
Apple (0)

Is there any way to remove the negative values and the zero values.
(I mean the whole line Blanket (-10) and they are not always the same) Sample code please.
Tia
Spiritwolf

Remove Items From Listbox
I'm loading junk files into a listbox where the user can place checks in the ones he wants to delete. It works fine but how do I remove the ones he deleted from the listbox? I can't get RemoveItem to work. Here's the code I'm using to delete the selected files.

Dim i
For i = 0 To lstFoundFiles.ListCount - 1
If lstFoundFiles.Selected(i) Then
Kill lstFoundFiles.List(i)
End If
Next i

Remove Items From A File
How would I remove a specific string of words from a text file, and then put them back, in a specific location in that same file?

***---Remove Listbox Items---***
if i have a number of items in a list box lets say a 100 and i want to remove 50 from the middle so 25 to 75. So how can i delete those items fromt he listbox. Al of this would be in a command button

Remove Items From Listview?
Hi,

I have a listview which allows multiple selections. I want to place a button on the form which removes each selected item.

I'm having difficulty because VB renumbers each item index number as each item is removed. So item #2 which had an index of #2 now becomes #1. This would be no problem if the multiple selection was from item 1 to 5 where you could just loop through and remove index #1 5 times. But, what if the user selects items randomly?

Any help would be appreciated..

DAn

Remove Array Items?
Hi again,

I've just made a string array by "split".

I just wonder if there is any ready method to remove an item so the array will be shrinked, or should I have to do it by myself?

Thanks!

Remove Items From Listview In VB6
I have a listview1 control with 3 columns, CustId, CustName and CustContact. Each time I selected a row then clicked on the Command button to delete the selected row(s), it's not happening. Instead I got this error message "Element Not Found". I don't quite understand what it meant and how to get the deletion working. Could someone please point me to the right direction. Thanks.

Here is a my sample codes:
I am using Component Lib : MSCOMCTL.OCX (VB6)


Private Sub BtnSelectRemove_Click()

      'remove listitems from Attendance list
      Dim vclm As ColumnHeader
      Dim vitmx As ListItem
      Dim i As Integer
      
      With Me.ListAttendance
             For i = 1 To .ListItems.Count
                 If .ListItems(i).Selected = True Then
        .listitems.remove(.listitems(i))
                 End If
            Next
      End With

End Sub

Have a Good Day,

Thanks and Cheers,
Lennie

Edited by - Lennie on 2/9/2005 3:44:27 PM

Remove ListBox Items
Hi

Please tell me how to remove selected items from the listbox.

Wht i m using is here:

Dim i As Integer
i = 0
Dim Count As Integer
Count = lstAssignment.ListCount - 1
For i = 0 To lstAssignment.ListCount - 1
If lstAssignment.Selected(i) = True Then
lstAssignment.RemoveItem (i)
End If
Next i


it showing me an Invalid property array index

Please Help Me.

Thanx

Remove All Duplicated Items From A Listbox
i am filling a listbox with a lot of items then doing some stuff with that but then i want to delete all duplicated items. what is the best way because there will be a lot.

thanks

Remove Multiple Items From A Listbox
How can I remove multiple items from a listbox?

I have tried this, but it won't work....


Code:
Dim i As Integer

For i = 0 To Me.lstFiles.ListCount - 1
If Me.lstFiles.Selected(i) = True Then
Me.lstFiles.RemoveItem Me.lstFiles.List(i)
End If
Next i

Remove Multiple Items From Listbox
Hi,

I have a listbox which is multiple selection enabled and I have a button which removes all selected items by looping through like so:


Code:
Do While PlayList.SelectedIndex <> -1
PlayList.Items.RemoveAt(PlayList.SelectedIndex)
Loop
This works, the problem is I have another piece of code which is triggered by the selected index being changed. It checks the count of the listbox and if empty does one thing and if not does another.

The problem is the selected index changes before the item is removed which means that even when the list is empty the count shows one and the program takes the wrong path.

Can anyone help?

Thanks
Stephen Reid

Listbox And Remove Multiple Items
i have this code for loading and removing items from a list box. i am generating an error with my remove item statment. i want to add the item at position i to the correct list box and also delete the item at postion i from both boxes. how i generate an invalid procedure call a the first removeitem command in either statement.

dim x as interger
x = 4

If card1Value > card2Value Then
MsgBox "card1 bigger " & card1 & " " & card2
For I = 0 To X
MsgBox I
lstDeck1.AddItem lstDeck1.List(I)
lstDeck1.RemoveItem lstDeck1.List(I)
lstDeck1.AddItem lstDeck2.List(I)
lstDeck2.RemoveItem lstDeck2.List(I)

Next
Else
MsgBox "card2 bigger" & card1 & " " & card2
For I = 0 To X
MsgBox I
lstDeck2.AddItem lstDeck1.List(I)
lstDeck1.RemoveItem lstDeck1.List(I)
lstDeck2.AddItem lstDeck2.List(I)
lstDeck2.RemoveItem lstDeck2.List(I)
Next I


any thoughts?

How Can I Remove Checked Items In A Listbox?
Hi,

I have a ListBox1 with a checkbox style and a cmdbutton.
How can i remove only the checked items in the listbox1?

Thanks,

Warad
yes i searched before i asked

Remove Selected Items In The Listview.
How I can remove the selected items in the listview?


Code:
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems.Item(i).selected Then

'what should I put here

End If
Next i

Remove Menu Items At Run Time
Hi, is it possible to remove items from menus added using the Menu Editor at run time?

Cheers

How To Remove Items From Listview Or Listbox ?
Hi all could any one show me i can delte item from both listview and listbox.Thanks

Remove Random Items From Listbox
Ok, I'm trying to remove 2 random items from a listbox at once. Then take the larger of the two randomly selected numbers and subtract the smaller from it. Then re-ad the ne number back into my listbox. This will repeat until only one number is left. Here's what i've got so far but I keep on getting error's.

Dim i As Integer
Dim Num As Integer
Dim Num1 As Integer
Dim j As Integer
Dim k As Integer
Dim f As Integer

Num = Round(Rnd * (List1.ListCount - 1), 0)
j = List1.List(Num)
Num1 = Round(Rnd * (List1.ListCount - 2), 0)
k = List1.List(Num1)

If j > k Then
f = j - k
ElseIf k > j Then
f = k - j
End If

For i = 1 To List1.ListCount
List1.RemoveItem (Num)
List1.RemoveItem (Num1)
List1.AddItem (f)
Next i


When I run this I get debug error 5 (Invaled procedure call or arguement) And it highlights "List1.RemoveItem (Num)" Any suggestions???

2 Listboxes-Remove Matching Items
VB Code:
'I searched and found this code that will copy all items from List1 to List2 if the'item isn't in List2.  What I'm trying to do is reverse it and Remove matching items'from List2 if they do exist in List1. 'Original Code  Dim i, j As Integer  Dim bMatch As Boolean  'this will take strings from list1 and add to list2  For i = 0 To List1.ListCount - 1    bMatch = False    For j = 0 To List2.ListCount - 1      If List1.List(i) = List2.List(j) Then        bMatch = True        Exit For      End If    Next j    'add list1 item to list2    If bMatch = False Then List2.AddItem List1.List(i)   Next i   'When I change it to remove the matching item it doesn't work   Dim i, j As Integer  Dim bMatch As Boolean  'this will take strings from list1 and add to list2  For i = 0 To List1.ListCount - 1    bMatch = False    For j = 0 To List2.ListCount - 1      If List1.List(i) = List2.List(j) Then        bMatch = True        Exit For      End If    Next j    'add list1 item to list2    If bMatch = True Then List2.RemoveItem List1.List(i)   Next i

Remove Items From Listbox....Resloved
Is there anybody knows how to remove items from a listbox with checkbox style?

e.g. I want to remove the first 3 items from the list so I select the first 3 items but my code just remove the first 2 items for me....and the third one is still in the list....

Please help


VB Code:
total = list1.ListCount    For i = 0 To total - 1        If list1.selected(i) Then            list1.RemoveItem list1.ItemData(i)        End If    Next

Disable Or Remove Datacombo Items
My project has 8 datacombo-boxes which are populated from the same list of data.
Is there a way to temporarily either disable/remove items from the list as they are used in each box - I need to ensure that each box contains a unique value from those available in the list presented.

Remove Matching Items From Listview
I'm using a listview to load a list of email address's. What I'm trying to do is remove all address's from a selected domain using a GetExtension Sub to get the domain name. The problem is when I call the sub RemoveDomain() it removes the address I clicked on and all that come before it leaving those after it and not removing all from that domain. First I'm geting the domain extension in lblExt.Caption and that works fine. I'm trying to match that with the selected item in Listview and remove all those. I hope I've made this clear what I'm trying to do. Here's what I have so far.

Public Function GetExtension(ByVal p_strFileName As String) As String
If InStr(p_strFileName, "@") = 0 Then Exit Function

GetExtension = Mid(p_strFileName, InStrRev(p_strFileName, "@") + 1)
End Function

Private Sub RemoveDomain()
On Error Resume Next
Dim x As Long
x = 1
While x < ListView1.ListItems.Count + 1
Debug.Print x

If GetExtension(ListView1.SelectedItem) = lblExt.Caption Then
ListView1.ListItems.Remove x
Else
x = x + 1
End If
Wend

End Sub

Remove Multiple Items From ListView
I've got a ListView control with the MultiSelect property set to True and would like to remove all of the selected items only. I've looked at some of the threads concerning this issue but am still having trouble. I can remove a single selected item but not all of the selected items. My code is as follows:


Code:
Private Sub cmdRemove_Click()

Dim I As Integer

For I = 1 To lstPlot.ListItems.Count
If lstPlot.ListItems(I).Selected = True Then
lstPlot.ListItems.Remove (I)
End If
Next I

End Sub


What am I missing?

Thanks for your help!

Add / Remove Menu Items At Runtime
How do I add and remove items in a menu at runtime?

Thanks

Howto Remove All Items From A Combobox
How do I remove al items from a combobox but leave the comboboxes text intact...

Also it should not create an error if there are no items in the list...

Remove Non Selected Listbox Items
I have a list box which allows you to select multiple items. I'd like to then have the option of removing all items that are not selected.

Here is what I have...


Code:

'remove any non selected items
For i = 0 To lstOccup.Items.Count - 1
found = False
For j = 0 To lstOccup.SelectedItems.Count - 1
If lstOccup.Items(i).ToString = lstOccup.SelectedItems(j).ToString Then
found = True
End If
Next
If found = False Then
lstOccup.Items.RemoveAt(i)
End If
Next



This doesn't work because once I use RemoveAt it means the for loops no longer work.

Editing List Items And ListSubItems In List View Control
Hi,

It is possible to edit ( add an entry ) the first column of a ListView control. By setting to automatic mode.

How do I edit the subsequent columns ( The listSubItems ).

BB

Combine List Items To Create New Item In Same List?
Hi all,

This has been giving me fits for a few days - any help would be most appreciated. I'm sure it's pretty simple, but I'm new to VB (and programming in general) and can't seem to come up with the correct syntax to get this to work:

I have a listbox from which the user can select mutliple items. Once user performs a multi-select, I enable a button (no problem there). When user clicks that button, I want to create a new item in that same list consisting of all selected items with "AND" between them.

Thus, if user had selected <item 1>, <item 2>, and <item 4>, the new item would be "<item 1> AND <item 2> AND <item 4>". Can someone please help me with the logic and syntax on this?

Here's what I have up to this point (I've removed the parts that I believe - based on the fact that this is not working - to be wrong and replaced them with ?????):

Code:
        Dim terms As String
        For Each terms In List.SelectedItems
            If List.SelectedItems.Count > 1 Then
                terms = ??????? & " AND " & ???????
            End If
        Next
        List.Items.Add (???????)


Thanks!!



Edited by - troy_atl on 10/17/2005 12:04:26 PM

How To List The Items Of Combo List When It Get Focus Without Click On It
Hi:
Here I have problem, I have a Combo list. If the user don't want to use mouse, and She want the Combo list list all of of it's item just like mouse click on it when she use TAB to focus on it. How can I implement this function. If anybody know about it. It will be very helpful
Millions of Thanks.


wky086

Remove SysMenu Items (right Click In Taskbar)
Need help...

I've subclassed the system menu (the right click thing that pops up in the taskbar) and removed all the items and put my own in, but I can't seem to delete the inherent separator... so there is this ugly separator at the top (not really separating anything), I've tried removing it using MF_BYCOMMAND and MF_BYPOSITION in the DeleteMenu function... nothing

any one have any ideas?
gR

Remove Items With A Special Text, Listbox
Lets say listbox goes like this

joe4 goes
joe goes
joe4 jumps
joe4 hops

How do I delete all of the lines that say joe4? And they are random everytime.

Remove Or Hide Double Items In Listbox
Hi,

Got a small problem (I hope)

Can Anyone tell me how to remove or hide double items from a listbox?

This is what I already have:
CODEPrivate Sub Combo1_Click()
    List1.Clear

    Set rs = New Recordset

    rs.Open "SELECT DISTINCT * FROM POSTCODE WHERE GEMEENTE = '" & Combo1.Text & "'", cn, adOpenDynamic

    Do Until rs.EOF
        List1.AddItem rs!Plaats  '<----
        rs.MoveNext
    Loop

    rs.Close
    Set rs = Nothing
End Sub

Copyright © 2005-08 www.BigResource.com, All rights reserved