Link to home
Start Free TrialLog in
Avatar of SDGEORGEC
SDGEORGEC

asked on

Mouse clicking uestion

I have command button, which i need to select one item
in the text box by mouse clicking and moving that one item
to a second text box.

Any one have any ideas?
Avatar of Microsoft
Microsoft

if you have a command button and you want to transfer the details from text box 1 to text box 2 then follow this code below,

private sub command_click()

text2=text1

end sub

im still not sure thats what you want



or do you mean you have a listbox and you want to beable to click on that item and make it appear in a second text box?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi, SDGEORGEC

as per i understood u have two text box and command button
in between that and wanted selected item goes on click to the second textbox. A seggesation why do'nt u use insted of text box listbox.

and use this code for transfering data from one listbox to another
 
Private Sub List1_Click(Index As Integer)
Select Case Index
    Case 0
       tem = List1(0).Text
    Case 1

End Select
End Sub

Private Sub Command1_Click()
On Error GoTo handler:
 
      If tem = "" Then Exit Sub
         List1(1).AddItem tem
exit sub
handler:
End Sub
Hi SDGEORGEC,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept ryancys's comment(s) as an answer.

SDGEORGEC, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

Computer101
E-E Moderator