Results 1 to 3 of 3

VBA code does not work in Excel 2007

Threaded View

  1. #1
    Registered User
    Join Date
    09-01-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    VBA code does not work in Excel 2007

    Hello,

    I'm a beginner with Excel programming. I inherited a report developed in Excel 2003. The report has a few charts. The axes on the chart change based on a VBA code. The scale changes in 2003 but does not work in 2007. So the graph appears to cut of the values falling out of range. Here is the code. Any help is appreciated.

    Private Sub ComboBox1_Change()
    On Error GoTo 1
    With Worksheets("CPC, % Supply-NPSR").ChartObjects(2).Chart.Axes(xlValue)
    .MaximumScale = Range("AF2").Value
    .MinimumScale = Range("AF3").Value
    End With

    With Worksheets("CPC, % Supply-NPSR").ChartObjects(1).Chart.Axes(xlValue)
    .MaximumScale = Range("AE2").Value
    .MinimumScale = Range("AE3").Value
    End With
    Last edited by ExcelNovice12; 09-01-2009 at 11:57 PM. Reason: adding code tags. Hope I got this right.

Thread Information

Users Browsing this Thread

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

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