Rotating Chart Objects

Huey462

Board Regular
Joined
Jul 25, 2011
Messages
147
I have a spreadsheet that, someone else made, which acts as a countdown timer. I would like to change the Chart Object pictures from the SI Swimsuit to pictures of home. I cannot, for the life of me, figure out how to add multiple pictures as a chart object, much less have it change with the VBA code below. I have tried searching these forums and the web as a whole, but with no success. More than likely I was looking for the wrong stuff. Any help would be greatly appreciated.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Code:
Private Sub Workbook_Open()
    Sheets("Sheet1").ChartObjects.Visible = False
    x = Day(Now())
    Sheets("Sheet1").ChartObjects(x).Visible = True
End Sub
<o:p> </o:p>
Thanks in advance
-Huey
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Change: Sheets("Sheet1").ChartObjects.Visible = False

To: Sheets("Sheet1").ChartObjects.Visible = True

Then rerun the code (or save and then re-open spreadsheet) and all the chart objects with the pictures will be visible. Edit each one with the photo of your choice. Once done, change the first line of the code back to what it was.

BTW: I know where you probably got the file from ;)
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top