سلام دوستان
چطور میشه با کلیک توی لیست کمبوباکس اطلاعاتش به تکس باکس منتقل بشه
امیدوارم واضح باشه
چطور میشه با کلیک توی لیست کمبوباکس اطلاعاتش به تکس باکس منتقل بشه
امیدوارم واضح باشه
Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.TextBox1.Text = Me.ComboBox1.Text End Sub Private Sub ComboBox1_Change() Me.TextBox1.Text = Me.ComboBox1.Text End Sub
Private Sub ListBox1_Click() Me.TextBox1.Text = ListBox1.List(ListBox1.ListIndex, 0) End Sub
Private Sub ComboBox1_Click() Dim str As String If str <> vbNullString Then str = str str = str & ComboBox1.Text TextBox1.Text = TextBox1.Text & " " & str End Sub
Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Dim arr() As Variant Me.TextBox1.MultiLine = True Me.TextBox1.ScrollBars = fmScrollBarsBoth ss = Me.ComboBox1.ListCount ReDim arr(0 To ss) For i = LBound(arr) To UBound(arr) - 1 arr(i) = Me.ComboBox1.List(i, 0) Next Me.TextBox1.Text = Join(arr, vbCrLf) End Sub
کامنت