Hi,
I got a chart in the sheet and when I select any value from dropdown list in same Sheet, it will show the chart of that value to me in.
Now I want bring this chart to userform but only the one of the dropdown list. I want select (i.e. Car) in the box for userform image.
so far i brought the image of the chart to userform but the problem is when i change to another in dropdown list, then my image is not the same that i wanted to show in userform. I need add code to say only select "Car" from the dropdown the list and when taking image, will be correct one; or something like this.
i would appreciate if you help me with this. thank you . sorry i am new to vba, thanks
Private Sub UserForm_Initialize()
Dim a As Range
Dim b As Range
Set CurrentChart = Sheets("Ind. Charts").ChartObjects(1).Chart
Fname = ThisWorkbook.Path & "\temp.gif"
CurrentChart.Export Filename:=Fname, FilterName:="GIF"
Image1.Picture = LoadPicture(Fname)
End Sub
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Bookmarks