shunz
05-13-2012, 12:37 AM
Hi,
I am trying to use the values of listbox to search certain items. Below is a portion of my code:
Sub search()
If ActiveSheet.Shapes("ListBox1").Value = "Ahom Kingdom" Then
Range("GR5").Select
ActiveSheet.Shapes("Object 67").Select
End Sub()
All I am trying to do here is that if the value selected in the listbox is "ahom kingdom" , then object 67 should be selected.
The code doesn't work. There is some error in the first line. Please help me rectify it.
I am trying to use the values of listbox to search certain items. Below is a portion of my code:
Sub search()
If ActiveSheet.Shapes("ListBox1").Value = "Ahom Kingdom" Then
Range("GR5").Select
ActiveSheet.Shapes("Object 67").Select
End Sub()
All I am trying to do here is that if the value selected in the listbox is "ahom kingdom" , then object 67 should be selected.
The code doesn't work. There is some error in the first line. Please help me rectify it.