Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
robert inman via OfficeKB.com
 
Posts: n/a
Default Combo Box List Problems

Is it possible,when selecting an item from a combo box list, which is
linked to another sheet,to have the font color or style change,depending
on the selection?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you go into design mode, and right click on that combobox (from the control
toolbox toolbar), you'll see a property called .forecolor. There's also a .font
property you can access.

You can change it with something like:

Option Explicit
Private Sub ComboBox1_Change()

Dim myColor As Long
Dim myBold As Boolean

With Me.ComboBox1
Select Case .ListIndex
Case Is = 0: myColor = RGB(255, 0, 0)
myBold = False
Case Is = 1: myColor = RGB(0, 255, 0)
myBold = True
Case Is = 2: myColor = RGB(0, 0, 255)
myBold = True
Case Else
myColor = RGB(0, 0, 0)
myBold = False
End Select
.ForeColor = myColor
.Font.Bold = myBold
End With

End Sub

This does change the colors/font in the dropdown, too.


"robert inman via OfficeKB.com" wrote:

Is it possible,when selecting an item from a combo box list, which is
linked to another sheet,to have the font color or style change,depending
on the selection?


--

Dave Peterson
  #3   Report Post  
robert inman via OfficeKB.com
 
Posts: n/a
Default

Dave I really appreciate your timely response. Only I don,t think I was
clear as to my problem. Is there any way to make the font style and/or
color change from item to item within the same list, in the same combo box.
If so please help. Again I thank you for your support.

--
Message posted via http://www.officekb.com
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Each option has a different font? Not within anything that's built into excel.

Sorry,

"robert inman via OfficeKB.com" wrote:

Dave I really appreciate your timely response. Only I don,t think I was
clear as to my problem. Is there any way to make the font style and/or
color change from item to item within the same list, in the same combo box.
If so please help. Again I thank you for your support.

--
Message posted via http://www.officekb.com


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box list question tanner g Excel Discussion (Misc queries) 1 April 21st 05 08:59 AM
List box or combo box on an Excel spreadshee... city Excel Worksheet Functions 1 April 7th 05 09:31 PM
dependent combo box list, with indirect reference Iyue Excel Discussion (Misc queries) 1 February 24th 05 10:45 PM
Combo box list depends on value Neal Excel Discussion (Misc queries) 3 February 1st 05 08:52 PM
Drop down list or combo box help needed metrueblood Excel Discussion (Misc queries) 1 January 12th 05 09:25 PM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"