Hi Everyone!
I have this project that I am currently working on. So basically, what I wanted to achieve is to change the source data of a Bar Chart that is displayed in my userform.
I have attached a sample for reference.
***For example.
I have a auto populated textbox and the value of it depends on the current user of the system.
For my 2nd image, Adam is my example and in my userform, what I wanted to see is to filter the data for Adam, similar to my image 1.
And so on..
Any help would be appreciated.. Thank you in Advance.
Module Code:
I have this project that I am currently working on. So basically, what I wanted to achieve is to change the source data of a Bar Chart that is displayed in my userform.
I have attached a sample for reference.
***For example.
I have a auto populated textbox and the value of it depends on the current user of the system.
For my 2nd image, Adam is my example and in my userform, what I wanted to see is to filter the data for Adam, similar to my image 1.
And so on..
Any help would be appreciated.. Thank you in Advance.
Module Code:
VBA Code:
Sub ChangeChart(ChartName As String)
Dim CurrentChart As Chart
Dim FName As String
FName = ThisWorkbook.Path & "\temp.gif"
Set CurrentChart = ThisWorkbook.Sheets("Charts").ChartObjects(ChartName).Chart
CurrentChart.Export Filename:=FName, filtername:="GIF"
Staff.imgChart.Picture = LoadPicture(FName)
End Sub