Results 1 to 5 of 5

VBA Code Error Upon Execution

Threaded View

  1. #1
    Registered User
    Join Date
    09-19-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unhappy VBA Code Error Upon Execution

    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
    Last edited by alansidman; 09-20-2013 at 04:29 PM. Reason: Added code tags and moved to Powerpoint forum

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automation Error At Odd Spot in Code Execution
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-02-2012, 11:50 AM
  2. Code execution has been interrupted error
    By vpnvipin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2012, 04:35 AM
  3. Error: Code Execution Has Been Interrupted
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2010, 07:32 AM
  4. Macro 'Code execution has been interupted' error after print?
    By Bluehair the Pirate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2006, 02:25 PM
  5. error: Code Execution has been interrupted
    By Joshua Fredrickson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2005, 11:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1