Kryst51
Singin' in the Hou. Rain
- Local time
- Today, 17:00
- Joined
- Jun 29, 2009
- Messages
- 1,896
Hi all,
I was trying to answer another thread, and came up with this example of how to formata the background of a combo box depending on what is selected in the list.
I got the background formatting to work. But when I tried to also included foreground formatting the code for the background messed up.
I am attaching my example, On the form the first combo box does not include the foreground change for the color "blue". The second combobox does include a foreground change for the color "blue". However when I select blue, instead of turning the foredgound white and the background blue, which is what I want, it turns the background black. The reason the foreground should be white is that when the background is blue, the text is hard to read.
I don't know enough about VBA to beable to tell what is going wrong. I appreciate any assistance given.
Edit: Also, is there a way to make the list for the combo box show white background with black text?
I was trying to answer another thread, and came up with this example of how to formata the background of a combo box depending on what is selected in the list.
I got the background formatting to work. But when I tried to also included foreground formatting the code for the background messed up.
I am attaching my example, On the form the first combo box does not include the foreground change for the color "blue". The second combobox does include a foreground change for the color "blue". However when I select blue, instead of turning the foredgound white and the background blue, which is what I want, it turns the background black. The reason the foreground should be white is that when the background is blue, the text is hard to read.
I don't know enough about VBA to beable to tell what is going wrong. I appreciate any assistance given.
Edit: Also, is there a way to make the list for the combo box show white background with black text?
Attachments
Last edited: