Hi
I'm facing this problem with this small piece of code which i'm experimenting with. I'm wrote the code in Powerpoint 2007 by which i want to change the color of the bars in a chart. The code executes fine by complied STEP BY STEP but gives me an error "Object Required" when i press F5.
Please help. Thanks in Advance.
Dim objSlide As PowerPoint.Slide
Dim objShape As PowerPoint.Shape
Dim objChrtData As PowerPoint.ChartData
Set objSlide = ActivePresentation.Slides(1)
For Each Shape In objSlide.Shapes
Set objShape = Shape
If objShape.HasChart Then
With objShape.Chart.ChartData
.Activate
.Workbook.Application.WindowState = -4140
RowCount = .Workbook.Worksheets("Sheet1").Cells(1, 1).currentregion.Rows.Count 'This if where the VBA gives the error
ColCount = .Workbook.Worksheets("Sheet1").Cells(1, 1).currentregion.Columns.Count
.Workbook.Application.Quit
End With
Set objSeries = objShape.Chart.SeriesCollection(3)
objSeries.Format.Fill.ForeColor.RGB = RGB(255, 255, 255)
' objSeries.Border.Color = RGB(255, 255, 255)
End If
Next Shape
Set objSlide = Nothing
Set objShape = Nothing
Bookmarks