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




ListBox - Move List Item To Place In List


I have a list box with several items. I am trying to make a button that when the user selects an item in the list box, they can click on the button which will move the item up one in the list box:

So if my list looked like this:

ONE
TWO
THREE
FOUR
FIVE

and the user selected FOUR and clicked the button the list would look like this:

ONE
TWO
FOUR
THREE
FIVE


Does anyone know how to do this?

Thanks,
M




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Move List Item Up And Down In Listbox
How do I move a line up and down in a listbox?

Move Item In List
how do you move an item up or down in a listbox???

thnx,
squirrelly1

Move A Item In A List Box
If I forget to put an item in a list box. Can I put it in and move it where it needs to be.

Thank you for your help

I would like to move it with the mouse

Move Item In List?
Hi guys!
I have a listbox which is populated by the user with pre-defined items. What i want to do is add two buttons
that allows the user to move the selected item up or down in the list. I have the below code (move down)
which seems to be on the right track, but it moves the selected item to the bottom of the list. I want it to go
just one step down, and the item under it one step up. Does anyone have any suggestions? And how would
i edit the code for the "move up" button?
Code:
Private Sub Command17_Click()
Dim x As Integer
    For x = List2.ListCount - 1 To 0 Step -1
        If List2.Selected(x) Then
            List2.AddItem (List2.List(List2.ListIndex))
            List2.RemoveItem (List2.ListIndex)
        End If
    Next
End Sub

Cheers!
Maverick



Edited by - Maverick2004 on 2/5/2005 12:51:27 AM

Move Selected List Item Up Or Down?
Hi.
Is it possible to move a list item up or down?
If yes can you give me the code to do it?
Thanks

Move Listview Item To Top Of The List
Hi, does anybody know how to move a Listview item to the top of the list?

I'd like to loop through the Listview and move all items that contain certain text to the top.

For Each List Item In Listbox
I have a list box which displays the usernames on my computer. how do i use the for each statment to pass the usernames so the code can be repeated for each user.

Thanks in advance
Chris1990

Listbox - Take First Item In List?
How do I extract the first line in a listbox? I know that to take data out you use lstBox.Text, but how do I automatically select line 1 before doing this?

How To Get All List Item From A Listbox Of An External Program?
I want my program to get all the list item from a listbox of an external/another program and transfer it to my program's listbox. The external/another program have a two listbox and also my own program. How can I programmed it? And it is possible to automatically add item to my listbox when the listbox of the external program add another item to the listbox? Thanks in advanced.

Quick Question: Listbox And Substituting Text For List Item
Ok, here's the problem: I've got my listbox right? I have a whole bunch of list items in the list box that have a very very long caption. Now what I want to happen is when a user clicks one of those captions, it is to have some DIFFERENT text to be stored into a variable. Like I click the list item, a separate piece of text is then stored into a string variable. Then later on, in a different form, I want to be able to use that variable to display the text instead of the text in the list box. I have some code set up but I am not exactly sure how to manipulate it.


VB Code:
Private Sub List1_Click(Index As Integer)Dim NPC1 As StringNPC1 = List1(0).TextDim NPC2 As StringNPC2 = List1(1).TextDim NPC3 As StringNPC3 = List1(2).TextDim NPC4 As StringNPC4 = List1(3).TextDim NPC5 As StringNPC5 = List1(4).TextDim NPC6 As StringNPC6 = List1(5).TextDim NPC7 As StringNPC7 = List1(6).TextDim NPC8 As StringNPC8 = List1(7).Text End Sub


Do I need to like have a line after that, that states:


VB Code:
Private Sub List1(6).Text_Click()NPC1 = ["textblahblah"]


Thanks!

Show Full Name Of A List Item Which's Name Exceeds The Listbox's Width?
I have a list that displays full filenames with paths and all. These names usually get pretty long, and exceed the listbox's width. How can I display their full names without using another label or textbox which will display it when they are selected? Something more like the ControlTipText. Please help.
10x

Finding List Item As U Typed In Combo Box(Dropdown List Style).
Basically the title say it all.

When I type a letter in combo box it finds item by matching the letter that I typed, but when I type in a second letter it searchs item that starts with the second letter.

I wonder is there a way to macthing list item as u typed in combo box(Dropdown List style).

Thanks in advance.
Joon

Create List Of Files From Folder But Allow Double Click On List Item To Run Bat
I am a newbie
But am making some progress
My next plan is to make a simple dialog with a list box and 3 buttons to do the following
List all the batch files in a folder
then allow me to highlight one item in the list so when I click the button it will run that bat file.

Sounds easy enough but I just keep hitting a brick wall and am not making any progress at all.

All help or similar snipits of code that I can re-organise will be greatfully apperciated.

Thanks in advance

HighLight List Box Selected List Item With User Defined Color
Hi Friends,

I need a help from u all. My problem is to change the Backcolor of the selected listitem of a listbox.

Let me explain detail. Normally in a listbox if we selected the list, the list item will be highlited with blue backgroud (ie. the selected item color settings of the system). Now I need to hightlight the selected list in the list box with my own color say red, green or something else.

Would anyone help me.

V.P. Vijayavel

How To Change Back Color Of List Item In List View
Dear members,

i am having small problem with listview control , I want to assing alternate colors to list items, but i con't,

hope someone will help

regards
D.L.Narayana

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

Change Background /Forgroound Of Each List Item In A List Box
How would i be able to change the back color of a listitem in a list control ? For example i want item number 1 to have a red background item number 2 to have a blue background etc.
Thanks for the help

Jerry

Add A List Item To A Loaded Form List
help please. this is probably very simple.

i have a form loaded and showing. i need to add items to a list box, and my code is in a public sub in a different module.

my code follows. i wind up getting an "object doesn't support this type of property..."

i feel like i am close, i just don't seem to be referencing the form list correctly.

thanks much!

Public Sub BuildOverviewList()

Dim dbSOURCE As Database
Dim dbTARGET As Database
Dim rsSOURCE As Recordset
Dim rsTARGET As Recordset
Dim strDatabase As String
Dim strTable As String

strDatabaseName = "ProductCategories.mdb"
strTableName = "tblCurrentPresentation"
Set dbTARGET = OpenDatabase(dbPath & strDatabaseName)
Set rsTARGET = dbTARGET.OpenRecordset(strTableName, dbOpenDynaset)

'aryProductGroup provides the selected categories
For i = 1 To UBound(aryProductGroup)
'aryCategory1
For j = 1 To UBound(aryCategory1)
If aryCategory1(j) = -1 Then
strDatabaseName = "Category1_information.mdb"
strTableName = "CategorySlides"
Set dbSOURCE = OpenDatabase(dbPath & strDatabaseName)
Set rsSOURCE = dbSOURCE.OpenRecordset(strTableName, dbOpenSnapshot)
'write the record to the target table and add to list1
'USE THE ARRAY POSITION (j) TO GET THE SLIDE NAME FROM THE CORRECT TABLE
'ADD THAT SLIDE NAME TO THE LIST.
With rsSOURCE
rsSOURCE.Move (j)
With rsTARGET
.AddNew
![StepID] = 4
![CategoryID] = aryProductGroup(i)
![ProductID] = j
![Name] = rsSOURCE.Fields("SlideName").Value
.Update
End With
'Forms.frmPresOview6.List1.AddItem rsSOURCE.Fields("SlideName").Value
Forms.frmPresOview6.List1.AddItem rsSOURCE.Fields("SlideName").Value
End With
'also add record to ProductCategories/tblCurrentPresentation
End If
Next j

Next i

###MoVe Items In A ListBOX! Simple Help! Like I Want To Move An Item One Down ###
Hi every1,

ANy1 knws any quick way by which i can move items in a listbox?
Like i have a list box and when i click a button i want the time to be move down by one item in the list or move up by one item...

cud any1 suggest a good method?


thx

Move Lines From List Box To List Box
G'day,

I found the attached program on the net and would like to use it with listboxes in a control array instead of separate list boxes as I have over a dozen of them.

I am running around in circles trying to do it. Can someone help me?

Peter

Create A Property Window Dropdown List AKA Listbox List/ItemData
I'm trying to create an enhanced listbox control (in VB6) and one of my main criteria is to make it funtion very similarly to the standard listbox control.
Creating dropdown lists of constants (i.e. the Style property) is easy enough. but I haven't been able to re-create the ability to add (array) items in the property window such as is possible with the standard Listbox List and ItemData properties.
Anyone know how (or if) this can be done in VB6?

Regards

Ant

Reading In Listbox.list Value Into An Fso Operation To Do A File Move Operation?
I have a huge log file and am pretty new to vb. I have read in the file into multiple listbox. I am having problems figuring out how to use the listbox.list value in a move fso operation. Is there a better way or better suggestion to accomplish this? Or suggestions?

AddItem To Combo List And Have The Combo List Be Able To Retain The Item Upon Recall
I have a project that I need to do for school. You are to have a command button, a combo/dropdown list and a text box, you are to enter a name and birthday in the text box and when you click on the command button it is supposed to enter it in the combo box. My problem is that I got it to enter into the combo box with additem, but it will not retain the item that I just added. When I close the program the item I added does not stay there. How do I get the combobox to retain everything that I add through the textbox on command click. PLEASE HELP

*RESOLVED* Getting Selected Item In List View To Move Into View*RESOLVED*
Hi, I am trying to get a List View to act like a combo box. At the top of the List View there is a text box where the following code searches the List View for the text entered, I have this code in the Change event of the text box so a search is done on each letter typed.

The code finds the record without a problem but I want it to move to the top or into view. Right now I have to scroll down to find the record it selected. Anyone have any ideas? Here is my code:


Code:
Private Sub txtFindFirst_Change()
Dim i As Integer
Dim l As Long
On Error GoTo NoRecord

If txtFindFirst = "" Then
GoTo NoRecord
Else
l = Len(txtFindFirst.Text)
For i = 1 To lstContacts.ListItems.Count Step 1
If StrConv(txtFindFirst, vbUpperCase) = StrConv(Left(lstContacts.ListItems(i).Text, l), vbUpperCase) Then
lstContacts.ListItems(i).Selected = True
Exit Sub
Else
End If
Next
End If

NoRecord:
On Error GoTo NoList
lstContacts.ListItems(1).Selected = True
strTransferID = lstContacts.SelectedItem.ListSubItems(1).Text
Exit Sub

NoList:
Exit Sub
End Sub


Thanks in advance for any help.

Move ListBox Item Up Or Down
Just wanted to make a small contribution to the forum. I looked around for this but didn't find anything really to my liking, so here's my version...


Code:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Move Selected listbox item up or down
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
const UP as integer = -1
const DOWN as integer = 1

Private Sub btnUp_Click()

If Me.lstDisplayCols.ListCount > 1 Then
Call MoveListItem(UP, Me.lstDisplayCols)
End If

End Sub

Private Sub btnDown_Click()

If Me.lstDisplayCols.ListCount > 1 Then
Call MoveListItem(DOWN, Me.lstDisplayCols)
End If

End Sub

Private Sub MoveListItem(ByVal intDirection As Integer, _
ByRef lstListBox As ListBox)

Dim intNewPosition As Integer
Dim strTemp As String

intNewPosition = lstListBox.ListIndex + intDirection
strTemp = lstListBox.List(intNewPosition)

If intNewPosition > -1 _
And intNewPosition < lstListBox.ListCount Then

'Swap listbox items
lstListBox.List(intNewPosition) = lstListBox.Text
lstListBox.List(intNewPosition - intDirection) = strTemp
lstListBox.Selected(intNewPosition) = True

End If

End Sub

the lstDisplayCols listbox is a list of selected columns to be displayed for a search result list. Just put the name of your list box there...

Move Item In The Listbox
How to move Item from the first index to second index one by one until last index. I have select the item. I want to move it down,just change the position. Code below does not works



Code:
For c = 0 To ListBox1.ListCount - 1

If ListBox1.Selected(c) = True Then
Dim idx As Integer
idx = ListBox1.ListIndex
If ListBox1.ListIndex > 0 Then
ListBox1.ListIndex = idx - 1

End If

End If
Next

Move ListBox To The Last Item
How do I move a listbox to the last Item?

Note: I use VB 3.0


Thanks for some help

ListView - List In The Same Place
HI:

This little piece of code list,in a listview object,a recordset and the next loop list annother and so on...In the listview we see a lot off lines...so far so good:


Code:

Do While Not Data1.Recordset.EOF
Set itmX = ListView2(1).ListItems.Add(, , CStr(Data1.Recordset!racamacho]))
rs.MoveNext
Loop



But now I want list a certain one recordset in,for example,the second position!
Do you mean what I want?
I had try:


Code:

Do While Not Data1.Recordset.EOF
Set itmX = ListView2(1).ListItems(2).item(, , CStr(Data1.Recordset!racamacho]))
rs.MoveNext
Loop




but the syntax it's not correct!

Can anybody help me?

Thanks

Move Item Inside Listbox (up And Down)
Hey, anyone with a simple code for moving items up or down in a lsitbox?
I mean if you have the items 1 - 5 in a listbox,and you would like
the item5 to become item2, then you simply click item5, hold button and drop where item2 is and then we get a list that looks like this:

NEW: ----- ORGINAL:
item1 ------ item1
item5 ------ item2
item2 ------ item3
item3 ------ item4
item4 ------ item5

Do you understand what i want? lets say its equal to winamp's behavior, for example...

Please help! PS: keep the code as simple as possible!

Move Item In Listbox With The Mouse
If I forget to put an item in a list box. Can I put it in and move it where it needs to be with the mouse


Thank you for your help

ComboBox List/add Item, If Item Exists, Dont Add It Again!
Dudes and Dudeesses I need help!

I have a problem with a combobox within a form. I'm scanning down the spreadsheet for values and asking a combobox to .additem, however, the same value may appear twice whilst scanning down. Is there an if statement that will look and check the combobox to see if it is already added, if so dont add it again, if not, add it?

as below,

Code:
combobox.AddItem "Hotmail"
combobox.AddItem "Yahoo"
combobox.AddItem "Hotmail"
Hotmail will be added twice, how can I stop that?

If worst comes to the worst, I can sort it out with a long winded method, but I'm hoping theres a quicker way.

Thanks for all your help

Mouse Move On Item Listbox Or Combobox
possibke to have the same effect on items in a VBA combobox for Excel?
Tks.

http://delphi.about.com/library/weekly/aa102604a.htm

Quick Listbox Questions (Move To Next Item)
Simple: Listbox and cmd button.

When I click the command button, the selected listbox item should move to the next item in the listbox. Click the cmd button again and the selected entry in the listbox should move to the next one.

Any help?

Move TextBox To Listbox Item Position
I have a list box with checkboxes., with say 10 items in the list.

I need to edit the item contained on a particular list box item.  ie....I click on the check box in item 3.

Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Move X, Y
End Sub

This does move the text box to the 3rd line of the list box
but not the horizontal position.

I would like to get the text box directly over the list box item., so i can type in the altered info and then place this data in the list box (ie replace)

Appreciate any ideas of how to do this


Split Text- Then Place Into Two List Boxes
Hi,
I am looking for an answer on the following:

I have in List Box(lstTrolley) for example "pears $0.50". I would like to place(by clicking once) "pears" into List Box(lstProduct) and "$0.50" into List Box(lstPrice).

Thanks a million for your help
Andonny

Single Item List Box (item Not Really Selecting)
Application=Access2002

The following code has worked for me in the past but won't now for some reason.
I have a private function and/or subs that performs a few simple operations such as setting listbox rowsources and simple math functions on a form. The queries set as rowsource use criteria from other single item listboxes.
Now, for some reason, the queries won't return values until the previously .selected(0) = true (single item) list boxes have been clicked on.
Problem has only been in creating a new form. Perhaps the problem did not occur in older created forms due to compatibility?


Private Sub fraEWTo_AfterUpdate()

[Edited]
    lstRotorHoursPriorTo.RowSource = "qryRotorSwapHoursTotTo" 'gets hoursprior from tblRotors
    lstRotorHoursPriorTo.Selected(0) = True ' This is one place where the problem seems to exist, the control does not function until it has been clicked on via mouse.

    LstClockInTo.RowSource = "qryRotorSwapRAHoursIPTo"
    LstClockInTo.Selected(0) = True

    txtRACHIPTo.Locked = False
    txtRACHIPTo.Value = txtClockHoursTo.Value - lstClockInTo.Value 'nor will this until the lstClockInTo box has been manually selected


A Mechanic in a Programmers shoes
Thanks




Edited by - greenfch on 12/7/2005 11:22:52 AM

Label/List Events Taking Place BEFORE Open Statement
ok - here's my code

Label1.Visible = True
pbar1.Visible = True
List1.Visible = False

Open App.Path & "saves" & List1.Text & "players.ehm" For Input As #1
Input #1, numofp
Close #1
pbar1.Max = numofp + 1
pbar1.Value = 0
X = 1
Open App.Path & "saves" & List1.Text & "players.ehm" For Input As #1
Input #1, waste
Do While Not EOF(1)
Input #1, P(X).a(1), P(X).a(2), P(X).a(3), P(X).a(4), P(X).a(5), P(X).a(6), P(X).a(7), P(X).a(8), P(X).a(9), P(X).a(10)
Input #1, P(X).a(11), P(X).a(12), P(X).a(13), P(X).a(14), P(X).a(15), P(X).a(16), P(X).a(17), P(X).a(18), P(X).a(19), P(X).a(20), P(X).a(21)
Input #1, P(X).a(22), P(X).a(23), P(X).a(24), P(X).a(25), P(X).a(26), P(X).a(27), P(X).a(28), P(X).a(29), P(X).a(30)
Input #1, P(X).a(31), P(X).a(32), P(X).a(33), P(X).a(34)
Input #1, P(X).a(35), P(X).a(36), P(X).a(37), P(X).a(38)
Input #1, P(X).a(39), P(X).a(40), P(X).a(41), P(X).a(42), P(X).a(43), P(X).a(44)
Input #1, P(X).a(45), P(X).a(46), P(X).a(47), P(X).a(48), P(X).a(49), P(X).a(50)
Input #1, P(X).a(51), P(X).a(52), P(X).a(53), P(X).a(54), P(X).a(55), P(X).a(56), P(X).a(57), P(X).a(58), P(X).a(59), P(X).a(60)
Input #1, P(X).a(61), P(X).a(62), P(X).a(63), P(X).a(64), P(X).a(65), P(X).a(66), P(X).a(67), P(X).a(68), P(X).a(69), P(X).a(70)
Input #1, P(X).a(71), P(X).a(72), P(X).a(73), P(X).a(74), P(X).a(75), P(X).a(76), P(X).a(77), P(X).a(78), P(X).a(79), P(X).a(80)
Input #1, P(X).a(81), P(X).a(82), P(X).a(83), P(X).a(84), P(X).a(85), P(X).a(86), P(X).a(87), P(X).a(88)
Input #1, P(X).a(89), P(X).a(90), P(X).a(91), P(X).a(92), P(X).a(93)
Input #1, waste
Input #1, P(X).a1(1)
Input #1, P(X).a1(2)
Input #1, P(X).a1(3)
Input #1, P(X).pot
Input #1, P(X).a1(4)
Input #1, P(X).a1(5)
Input #1, P(X).a(94), P(X).a(95), P(X).a(96), P(X).a(97), P(X).a(98)


pbar1.Value = pbar1.Value + 1
X = X + 1
Loop
Close #1

Form2.Show



here's my problem... for some reason the label.visible=true and list1.visible=false events always take place after the loading...

when i hit on the button for this code it shows the progressbar, starts to load the file - but keeps the list visible and the label invisible... then once it's done it shows the other form... then when i click on the first form (the one with this code) it has finally done the visible code for the label and list

is there some way to do the code before, or while the open statement is working? I'll be adding another file or two to be loaded in this command - and i'd like to make it so the label caption changes to tell which file it's loading

will i maybe have to make these statements in modules and load them like that? so i'd have to made a module with the command for the label visibility then one for the file loading? cause that seems silly, but maybe it'd work

maybe i'm just missing something - like a math sequence.. perhaps VB does some codes in order... is there an easy way to make the label and list command go first?

Chess Move List
What would be the best way to contain a list of chess moves using VB6? I tried using the conventional listbox but that means I need two separate listboxes for white and black. It doesn't look very nice because after a while they generate scrollbars of their own.

The Listview control on the other hand is rather complicated to control so I'm not very sure if it's what I'm looking for. As usual, the Microsoft documentation on it just can't give it to me straight. All I need to know is how to get it to look the way I want (no icons and images etc.), put stuff in it and take stuff out.

Anyway, I need something that displays both white and black moves side by side yet is connected (i.e. having only one scrollbar). Preferably, users would also be able to click on each 'ply' (i.e. half-move) to go to that position.

Move And Delete In A List
I would like to integrate "move up", "move down", "rename" and "delete item" functions to a list.
So I would like to know what code to use to find out which item is selected in a listbox. For the rest I think I can manage...
Thanks for your answers!
Andrew

List Box Item Scrolling (Next Item)
Hello,

I was wondering what the code would be for a command button to make the next item in the list box be selected?

Kind of like a NEXT button.
EXAMPLE:
List box Line 1
List box Line 2
List box Line 3
List box Line 4

If List box Line 2 is selected then clicking the next button would DESELECT List box Line 2 and SELECT List box Line 3.

If I didn't explain enough just let me know.

Stilekid007

Move Items In 2 List Boxes
I need a code that when the user either clicks up or down items in 2 listboxes will move.

Let me explain... when the user clicks the second of the first list box then clicks the up cmdUp button the second item of the second listbox will also move up. Any suggestions?

Last List Box Item
I have a list box that is filled dynamically and I don't know in advance how many items it will contain. How can I get the last item value? Here is what I tried:

Code:
lstBibPlace.Index(lstBibPlace.ListCount - 1)
but that generated a 'wrong number of arguments' error message.

Thanks!

List Item I
I have a loop here for saving a list's contents. i want the i item of the list. how can i take that? and as soon as i save i want to store the i item read from the file put into the list. how can i do that too? thanks anyway for any answers....

Add Item To List Box
Hi,
Below is the code im using to sort a file into a list box.
Only thing is though im putting it into a rich text box first.
When i do this the file is to big and so when it goes to sort it i get an overflow error.

How can i chnage this code so it dosent go through the right text box and gets sorted into the list box straight away.


Code:
otext = Display.Text
mtext = Replace (otext , Chr$(0) , " ")

Display.Text = mtext

Dim Count As Integer
Count = 0

Dim sentence As String
sentence = "the fat cat eats fork.txd from the can"

Dim words() As String
words = Split(sentence) ' Split up the sentence into words

Dim i As Integer

For i = 0 To UBound(words) ' Loop through each word
Dim word As String ' Set the word to a variable
word = words(i)

If Right$(word, 4) = ".txd" Then ' If the word ends in .txd
Count = Count + 1
List1.AddItem Count & ": " & word
End If
Next i

Thanks for any help.
-Dave

Add An Item To List 6
I would like to add an item to list 6 after pressing a button.

the item simply and always says End of Search. Can anyone tell me how to do this?

Also I have a timer8 and it counts in seconds. Is there a way that when the button is pressed, the timer is enabled and starts to count, and as each second goes on, a labeltime.caption number is increased by one. And when the list 6 gets the end of search item added to it, the timer is disabled? thanks!

Add An Item In A List Box
I have a list box and i am trying to add elements as follows

ns = 4
Dim temp As String
For x = 1 To ns - 1
temp = "Stage " + x + " Oulet"

List1.AddItem temp, List1.ListCount
Next

Basically i would like the items in the list box to appear as follows:

Stage 1 Outlet
Stage 2 Outlet
Stage 3 Outlet
etc

A mismatch error comes up when i try to this!
I tried to change the + x + part of the expression to
+String(x) +
But this did no work either!

Please help !!!

List Box Item
I have to list box. If i add an item from list1 to list2 and the item already exists a beep sound

But how can i change the color of that item in list2 and make it blink?

Going To Next Item In List??
ok, here's a tricky one. Say I have 3 filenames in a listbox. when the user double-clicks on the file, my program calls on the Shellexecute API call to open the file with it's default program. ok say for example these are *.wav files. When the first file in the list is finished playing I want the program to automatically go to the next file in the list and use shellexecute to open it. So my question is: How can I get my program to recognize when the playing file has finished playing? Any suggestions, tips, flames, etc. appreciated. Thanks

-Jeremy

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