+ Reply to Thread
Results 1 to 9 of 9

Code to change gap width in chart

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    America
    MS-Off Ver
    MS Office 2010
    Posts
    23

    Code to change gap width in chart

    Please Login or Register  to view this content.
    How would I change this code so it would work? It stops at Activechart. SeriesCollection(1).Select

    And I did the for loop becuase I want the active chart to be selected (I wouldnt know the name of the chart). Any help would be greatly appreciated.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to change gap width in chart

    would be great if u provide sample workbook it will help us to provide perfect solution and to test as well
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Registered User
    Join Date
    05-18-2015
    Location
    America
    MS-Off Ver
    MS Office 2010
    Posts
    23

    Re: Code to change gap width in chart

    I would If I could but the data is confidential. I just somehow need the gap width of the active chart to be turned to 0. That's all

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to change gap width in chart

    replace some your below code
    Please Login or Register  to view this content.
    with below one

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-18-2015
    Location
    America
    MS-Off Ver
    MS Office 2010
    Posts
    23

    Re: Code to change gap width in chart

    It works up until I get to
    Please Login or Register  to view this content.
    Any thoughts on why?

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to change gap width in chart

    without activating/selecting the chart your trying to select the groups due to that coding getting Error

  7. #7
    Registered User
    Join Date
    05-18-2015
    Location
    America
    MS-Off Ver
    MS Office 2010
    Posts
    23

    Re: Code to change gap width in chart

    Well, I keep getting the run-time error 1004: Invalid Parameters. I'm clicking on the chart and running the macro and it still isn't working.

  8. #8
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Code to change gap width in chart

    in which code your getting error ?

    did your replace my provided code with yours ?

  9. #9
    Registered User
    Join Date
    05-18-2015
    Location
    America
    MS-Off Ver
    MS Office 2010
    Posts
    23

    Re: Code to change gap width in chart

    Nevermind! My series were not numbers which is why it wasn't working. They were labeled with text. Thank you!

+ 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. Change Chart Code not working
    By pauldaddyadams in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 11-15-2019, 11:00 PM
  2. Excel 2007 : Change width of chart's bars
    By SueWithQuestion in forum Excel General
    Replies: 7
    Last Post: 07-10-2014, 03:23 PM
  3. [SOLVED] VB Code to delete column and change column Width
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2014, 06:25 PM
  4. Excel 2007 - Change Chart Line Style Width Default From 2.25pt
    By Bryan01 in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 03-14-2012, 04:12 PM
  5. VBA Code to Change Length and width of Print Area
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2012, 11:39 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