![]() |
Fonts and Userform and VBA
I have a listbox that contains four items, AAA, BBB, CCC and DDD (for
example). I have a textbox that would contain one of those four values. What I would like to do is: If Textbox.value (i.e. BBB) = Listbox.value (i.e. found in or contains?) set FONT of AAA, CCC, DDD in listbox to light blue Set Italic of AAA, CCC, DDD in listbox to True Changing those that do not match what is in the textbox, change to another font...? Don't know if you can do some kind of 'contains' or 'like'... Thanks... |
Fonts and Userform and VBA
The List box control does not support different fonts for the list items.
Maybe the ListView control does, or find a custom control on the web with that functionality. NickHK "Gimp" wrote in message oups.com... I have a listbox that contains four items, AAA, BBB, CCC and DDD (for example). I have a textbox that would contain one of those four values. What I would like to do is: If Textbox.value (i.e. BBB) = Listbox.value (i.e. found in or contains?) set FONT of AAA, CCC, DDD in listbox to light blue Set Italic of AAA, CCC, DDD in listbox to True Changing those that do not match what is in the textbox, change to another font...? Don't know if you can do some kind of 'contains' or 'like'... Thanks... |
Fonts and Userform and VBA
Or your code could select the list item that matches the textbox.
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "NickHK" wrote in message ... The List box control does not support different fonts for the list items. Maybe the ListView control does, or find a custom control on the web with that functionality. NickHK "Gimp" wrote in message oups.com... I have a listbox that contains four items, AAA, BBB, CCC and DDD (for example). I have a textbox that would contain one of those four values. What I would like to do is: If Textbox.value (i.e. BBB) = Listbox.value (i.e. found in or contains?) set FONT of AAA, CCC, DDD in listbox to light blue Set Italic of AAA, CCC, DDD in listbox to True Changing those that do not match what is in the textbox, change to another font...? Don't know if you can do some kind of 'contains' or 'like'... Thanks... |
All times are GMT +1. The time now is 03:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com