Jump to content



Photo

Vba - textbook search to select listbox entry


  • Please log in to reply
1 reply to this topic

#1 CG-88

CG-88

    ||Modified||

  • Tech Issues Solved: 1
  • Joined: 16-July 12
  • OS: Windows 8.1
  • Phone: Lumia 625

Posted 20 April 2013 - 23:40

Ok guys as the title states I am wanting to be able to type whatever in a textbook and then in button.click auto select the first match in a listbox.

So user enters text, clicks button, if the text is a match to an entry in listbox it selects it.

The listbox is loaded from a textfile as extra info but I don't think that's relevant.

Even if it's a pointer in the thought direction it will be useful, thanks guys!!!!!!


#2 OP CG-88

CG-88

    ||Modified||

  • Tech Issues Solved: 1
  • Joined: 16-July 12
  • OS: Windows 8.1
  • Phone: Lumia 625

Posted 21 April 2013 - 19:20

Ok, I think I got it, using InStr to search for a partially string within the full string of a selected index of a listbox.

Put it on a loop and voila, keeps going one by one until it finds the partial string typed into a textbox.

Will post up working code when I get the chance incase it helps anyone else.