Hi everybody,
I'm working in Human Ressources and I'm creating a file with a lot of datas on our employees.
I have a Workbook with several Worksheet and i'd like to make a dynamic Search bar with a dynamic list box to display results,
this "search bar" would've to fill the "result box" in sheet1 with data provided by a single column in sheet2.
This code below worked pretty well on a single sheet but i haven't managed yet to do that with several sheets...
I wouldn't need the colours anymore as the datas are in another sheet but that's just an example.
Could you help me please?
Merci à tous et toutes,
Santury from France
I'm working in Human Ressources and I'm creating a file with a lot of datas on our employees.
I have a Workbook with several Worksheet and i'd like to make a dynamic Search bar with a dynamic list box to display results,
this "search bar" would've to fill the "result box" in sheet1 with data provided by a single column in sheet2.
This code below worked pretty well on a single sheet but i haven't managed yet to do that with several sheets...
I wouldn't need the colours anymore as the datas are in another sheet but that's just an example.
Could you help me please?
Merci à tous et toutes,
Santury from France
Code:
[COLOR=#000080][B]Option[/B][/COLOR] Compare Text
[COLOR=#000080][B]Private[/B][/COLOR] [COLOR=#000080][B]Sub[/B][/COLOR] TextBox1_Change() [COLOR=#008000]
[/COLOR]
Application.ScreenUpdating = [COLOR=#000080][B]False[/B][/COLOR]
Range([COLOR=#800000]"A2:A24"[/COLOR]).Interior.ColorIndex = 2 [COLOR=#008000]
[/COLOR] ListBox1.Clear [COLOR=#008000]
[/COLOR]
[COLOR=#000080][B]If[/B][/COLOR] TextBox1 <> [COLOR=#800000]""[/COLOR] [COLOR=#000080][B]Then[/B][/COLOR]
[COLOR=#000080][B]For[/B][/COLOR] ligne = 2 [COLOR=#000080][B]To[/B][/COLOR] 24
[COLOR=#000080][B]If[/B][/COLOR] Cells(ligne, 1) [COLOR=#000080][B]Like[/B][/COLOR] [COLOR=#800000]"*"[/COLOR] & TextBox1 & [COLOR=#800000]"*"[/COLOR] [COLOR=#000080][B]Then[/B][/COLOR]
Cells(ligne, 1).Interior.ColorIndex = 43 [COLOR=#008000]
[/COLOR] ListBox1.AddItem Cells(ligne, 1)[COLOR=#008000]
[/COLOR] [COLOR=#000080][B]End[/B][/COLOR] [COLOR=#000080][B]If[/B][/COLOR]
[COLOR=#000080][B]Next[/B][/COLOR]
[COLOR=#000080][B]End[/B][/COLOR] [COLOR=#000080][B]If[/B][/COLOR]
[COLOR=#000080][B]End[/B][/COLOR] [COLOR=#000080][B]Sub[/B][/COLOR]