No of visitors who read this post: 177
Category: Windows 7
Type: Question
No votes yet

What is the necessary code for moving items from a list box to an individual textbox?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

Hello Dear,

Here is the necessary code for you, hope this may prove helpful to you:

[case 1]
Msg "Hi"
[case2]
msg "hi"

Now you have to  place these items on another dialog.
Though iit seems like:

[case1]
Msg "hi"
... ---->Place a new one and open that.
[case2]
Msg "hi 2"


Now try this


Code:-
Private Sub Command1_Click()
Dim newe as Integer
newe = Newevent.EventList(Eventnum).ListCount
Newevent.EventList(Eventnum).AddItem "<Msg>: " & Text1.Text, newe
'This bit is OK, places the message.

If Newevent.EventList(Index).Text = "..." Then
Newevent.EventList(Index).List(Newevent.EventList(Index).ListIndex) = "..."
Newevent.EventList(Index).List(Newevent.EventList(Index).ListIndex) = "<Msg>: " & Text1.Text
'Only one thing to happen for a Case
'Need it so you can have more than 1 Message under
'case 1, case 2,etc... (Move every ListItem down 1?) -Chris

Dim Position
For n = Newevent.EventList(Index).ListCount To Position + 1 Step -1
Newevent.EventList(Index).List(n) = Newevent.EventList(Index).List(n - 1)
Next
Newevent.EventList(Index).List(Position) = "..."
End If
Exit Sub
Unload events
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub

Thanks for having your time