I am having a textBox and a listbox with list of various cities being populated from excel file
Now each city has one of two option, either within territory or outside. I want that option to be shown in textBox
I tried something like this :
Private Sub CommandButton1_Click()
TextBox2.Value = Application.VLookup(Me.ListBox1.Text,Sheets("Sheet1").Range("B:C"), 2, False)
End Sub
But am getting error saying that Run Time Error 2147352571 (80020005) . Could not set Value property. Type mismatch. Please help to solve this problem
My excel file is something like this
Aucun commentaire:
Enregistrer un commentaire