+ Reply to Thread
Results 1 to 9 of 9

Remove Chart Area Border - Where in Code is it Added?

  1. #1
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Question Remove Chart Area Border - Where in Code is it Added?

    I have very little knowledge of editing Visual Basic and I'm a little stuck on something: somewhere within this code (below) I am getting a chart area border showing on my graphs - but I don't want a border and cant find the coding to remove it. (I previously had Excel 03 and found this easier as I would record a macro and look at the coding to see where I needed to edit, but I can't seem to do that in 07


    Could someone point out how I could remove the border please (do I need to attach a sample workbook for this?)

    Many thanks in advance.



    Please Login or Register  to view this content.
    Last edited by Janc; 06-13-2011 at 03:31 AM.

  2. #2
    Registered User
    Join Date
    05-11-2011
    Location
    College Station, Texas
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    42

    Re: Remove Chart Area Border - Where in Code is it Added?

    Hi Janc,

    If you can attach me a sample file, I can set it right for you

    Regards,
    Abi
    Abi

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,297

    Re: Remove Chart Area Border - Where in Code is it Added?

    If you can remove it manually, record a macro while you do it. Then find the equivalent code in your macro and modify it.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Remove Chart Area Border - Where in Code is it Added?

    Thank you Abi, sample file attached



    Thanks also TM Shucks Manually removing and recording was exactly how I tried to do it (as this used to work for me when I had '03), but this was all I got from 07:

    Please Login or Register  to view this content.


    It didn't appear to record that I added a border and then removed it, but I'm still very much finding my way around '07 as it was only installed very recently.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    Re: Remove Chart Area Border - Where in Code is it Added?

    Hi,
    The border is applied by default, so you may not see the code.

    To remove the border try:
    Please Login or Register  to view this content.
    Last edited by Jbentley; 06-12-2011 at 07:59 PM. Reason: change end tag on code

  6. #6
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Remove Chart Area Border - Where in Code is it Added?

    Jbentley, thank you so much, that works perfectly!
    Last edited by Janc; 06-13-2011 at 03:36 AM. Reason: Spelling

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,297

    Re: Remove Chart Area Border - Where in Code is it Added?

    Just as an aside, you can make your code much shorter, more efficient and quicker by:

    * removing all the default settings for fonts, etc
    * using With ... End With instead of xxx.Select ... Selection ...
    * enclosing your code in ... ScreenUpdating=False / ScreenUpdating = True

    I have adjusted some, but not all, of your code in the attached, updated, workbook.

    Regards
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-30-2009
    Location
    UK
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    60

    Re: Remove Chart Area Border - Where in Code is it Added?

    This helps a lot as I was aware there was a lot of code in there that probably didn't need to be so I will go through now using your edits as examples and see which parts I can take out.

    Thanks for going to the trouble of looking at my code, it's very much appreciated

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,297

    Re: Remove Chart Area Border - Where in Code is it Added?

    You're welcome. Thanks for the rep.

    I learn as much from doing this as others benefit from it so it's a mutual gain.

    Regards

+ Reply to Thread

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