Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using the VBA. I want to change the line color based on the value selected in the combo box. Can anybody help on this. Thanks, Avinash Sharma |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub ComboBox1_Change()
Shapes(yourlinename).Line.ForeColor.SchemeColor = ComboBox1.Value End Sub Replace yourlinename with the name of the line you want to change. Likewise, if your combobox is not Combobox1 you must change this reference as well. The combobox should contain the SchemeColor numbers that correspond to the color you want. For instance, Color SchemeColor Number White 1 Red 2 Light Green3 Blue 4 Yellow 5 Pink 6 Cyan 7 Black 8 Green 17 Light Gray 22 Gray 23 Orange 53 You could also list the names of the colors in the combobox and reference the color number in code based on the selection. "Avinash" wrote: Hi, I am using the VBA. I want to change the line color based on the value selected in the combo box. Can anybody help on this. Thanks, Avinash Sharma |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change line chart color based on condition like + and -. | Charts and Charting in Excel | |||
How to change color of line and point markers on a line graph | Charts and Charting in Excel | |||
Change Line color based on 2 different cells | Excel Discussion (Misc queries) | |||
Make a line in a bar chart, and change color of any bars that exceed the line | Excel Discussion (Misc queries) | |||
How to change a bar to line in a combo chart? | Charts and Charting in Excel |