PDA

View Full Version : [SOLVED:] Display 3 donut charts based on combobox



djemy1975
11-15-2018, 01:47 AM
Dear friends,

I have developped a userform to filter my data with the help of your kind developpers and I am going now to get forward to make it a suitable application for my needs.Therefore, I need to display 3 charts either as live charts or as images in my userform based on the selection of project type in my combobox6.I also need to be able to edit data from textboxes ("from textbox3 to textbox18").

I have also encountered a problem in displaying textboxes values properly as they are not fully displayed.Here is a screenshot to clarify my needs:

23199

Best regards,

djemy1975
11-15-2018, 02:15 AM
Hi again,

I have tried to solve the first problem and I think it worked like that:

I added a sub and called it in combobox6 change according to the value choosen using select case.The code is as follows:any suggestions would be highly appreciated.


Private Sub UpdateChart() Dim FName As String

Set currentchart = Sheets("Charts").ChartObjects(ChartNum).Chart
currentchart.Parent.Activate

'currentchart.Parent.Width = 300
'currentchart.Parent.Height = 150

' Save chart as GIF
FName = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
On Error Resume Next
Kill FName
On Error GoTo 0

currentchart.Export Filename:=FName, FilterName:="GIF"


' Show the chart
Image1.Picture = LoadPicture(FName)
Kill FName
End Sub

Combobox change:

Private Sub ComboBox6_Change()
'Display a chart according to project type from sheet "Charts"
'I mean "Graphique3","Graphique4","Graphique5" =Projects progress %
Select Case ComboBox6.Value
Case Is = "Basic to Sustain"
ChartNum = 3
UpdateChart
Case Is = "Specific to sustain"
ChartNum = 4
Case Is = "Improve-performance"
ChartNum = 5
End Select

UpdateChart
'
End Sub23200

Please help me for the other two problems,

djemy1975
11-15-2018, 03:42 PM
Dear friends,

Is it possible to format rows in listview and sheet according to status "Etat" (column 47 in my 3 sheets) value: I need a conditional formatting like this:
1- When Column 47 value is "clôturé" ,I want the whole row in my listview becomes red.
2- When Column 47 value is "en cours" ,I want the whole row in my listview becomes green.

Is this approach can be done?
Waiting for your reply.Thanks in advance,