+ Reply to Thread
Results 1 to 1 of 1

Thread: Implimenting a graph scaling macro

  1. #1
    Registered User
    Join Date
    05-22-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    3

    Implimenting a graph scaling macro

    I am a programing novice and need help implimenting a macro i found on the internet in excel 2003. what i esentially want is to be able to plot a graph and then to zoom in on a slice of data as defined by the user. in this case a slice of time. i have set up the excel file as discribed on the web site. any help would be greatly appreciated. cheers

    website: http://peltiertech.com/Excel/Charts/...nkToSheet.html

    macro code :
    Option Explicit
    
    Private Sub ChangeAxisScales()
        With ActiveSheet.ChartObjects("Chart 1").Chart
    
            ' Category (X) Axis
            With .Axes(xlCategory)
                .MaximumScale = ActiveSheet.Range("$E$2").Value
                .MinimumScale = ActiveSheet.Range("$E$3").Value
                .MajorUnit = ActiveSheet.Range("$E$4").Value
            End With
    
            ' Value (Y) Axis
            With .Axes(xlValue)
                .MaximumScale = ActiveSheet.Range("$F$2").Value
                .MinimumScale = ActiveSheet.Range("$F$3").Value
                .MajorUnit = ActiveSheet.Range("$F$4").Value
            End With
    
        End With
    End Sub
    Attached Files Attached Files
    Last edited by rylo; 05-29-2011 at 09:09 PM. Reason: added code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0