sgmpatnaik
Active Member
Hello
i have one user form in that UserForm i have placed one List Box and One TextBox.
now what i want i want popup the Text in Text Box of List Box2nd option, i mean in my list Box i mention as
a = Split("meter, inch, foot, yard", ",")
b = Split("m, In, Ft, Yd", ",")
when i select the meter in ListBox then in Text Box to be display as m, inch to be In so far
here i try the below code but i fail
Kindly suggest me on this
Thanks
Regards
i have one user form in that UserForm i have placed one List Box and One TextBox.
now what i want i want popup the Text in Text Box of List Box2nd option, i mean in my list Box i mention as
a = Split("meter, inch, foot, yard", ",")
b = Split("m, In, Ft, Yd", ",")
when i select the meter in ListBox then in Text Box to be display as m, inch to be In so far
here i try the below code but i fail
Code:
Option Explicit
Dim a() As String
Dim b() As String
Dim i As Long
Sub UserForm_Initialize()
a = Split("meter, inch, foot, yard", ",")
b = Split("m, In, Ft, Yd", ",")
ListBox1.List = a
End Sub
Private Sub ListBox1_Change()
With Me
On Error Resume Next
.TextBox1.Value = .ListBox1.Value
End With
End Sub
Kindly suggest me on this
Thanks
Regards