+ Reply to Thread
Results 1 to 5 of 5

Need a help to tidy up VBA code for auto scaling a chart.

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Geraldton, Australia
    MS-Off Ver
    2013
    Posts
    36

    Need a help to tidy up VBA code for auto scaling a chart.

    Hey guys,

    I need a bit of help with this code I've written.

    My worksheet calculates the max value from a set of cells then autoscales the chart.

    The problem is, it flickers because its constantly calculating on the fly.

    Some how I need to have an 'If Then' in there somewhere to tell it to only calculate when the last cell value has been entered.

    Also, I've probably got way too many "With" and "End With" in the code.

    The minimum scale isn't actually required because its always 0, but I can just remove that line.

    Any help or advice is greatly appreciated.

    Below is the code.

    Cheers.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Need a help to tidy up VBA code for auto scaling a chart.

    Can you post the file as well?

    Thanks
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    06-20-2014
    Location
    Geraldton, Australia
    MS-Off Ver
    2013
    Posts
    36

    Re: Need a help to tidy up VBA code for auto scaling a chart.

    I think I may have worked it out.

    When I get time, I'll have another look and if its still not working, I'll post the file.

    Thanks nobffinme

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need a help to tidy up VBA code for auto scaling a chart.

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    06-20-2014
    Location
    Geraldton, Australia
    MS-Off Ver
    2013
    Posts
    36

    Re: Need a help to tidy up VBA code for auto scaling a chart.

    Thanks sixthsence,

    I came up with a solution before I read your post.

    I set that code up as a marco and just used the following:

    Please Login or Register  to view this content.
    B62 being the last cell that had a required a value.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Code Amend: Tidy Up andDelete All Rows Where Cell Value Is Number
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2014, 01:50 PM
  2. Replies: 7
    Last Post: 01-13-2009, 09:33 AM
  3. tidy up code produced by macro recorder
    By ADAMC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2007, 09:24 AM
  4. Goto misused: help to tidy Code
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2005, 12:36 AM
  5. smart & tidy code for many checkBox_Change()
    By Fendic in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2005, 09:52 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