+ Reply to Thread
Results 1 to 8 of 8

Change Chart Type

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    edmonton
    MS-Off Ver
    2010
    Posts
    16

    Change Chart Type

    I am fairly new to VBA, but I can't seem to find this anywhere..
    Does anyone know if there is an easy way to creat a macro that selects all the charts on a page and changes them from a scatter plot back to a line graph and vice versa.

    Thanks for the insight.

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Change Chart Type

    Does this do what you are looking for?

    Please Login or Register  to view this content.
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  3. #3
    Registered User
    Join Date
    06-19-2015
    Location
    edmonton
    MS-Off Ver
    2010
    Posts
    16

    Re: Change Chart Type

    Oh wow that's great almost perfect. Except it changed my setting kinda.. I guess I should be more specific in that I need the data points for the line chart and a straight line connecting the points on the scatter plot.

  4. #4
    Registered User
    Join Date
    06-19-2015
    Location
    edmonton
    MS-Off Ver
    2010
    Posts
    16

    Re: Change Chart Type

    I added the word markers after x1Line it works to add markers to the line chart however then the button doesnt switch back to the scatter plot again and it is stuck on the line chart.

    Whereas your original code kept it switching back and forth!

  5. #5
    Registered User
    Join Date
    06-19-2015
    Location
    edmonton
    MS-Off Ver
    2010
    Posts
    16

    Re: Change Chart Type

    sorry for the many replies, I now have the lines connecting the scatter plot so all I need is the markers on the line Chart!

    Again I can get them by "myChart.Chart.ChartType = xlLineMarkers" however once it changes to that chart the macro no longer works.

  6. #6
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Change Chart Type

    Does this work?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-19-2015
    Location
    edmonton
    MS-Off Ver
    2010
    Posts
    16

    Re: Change Chart Type

    Yes Thank you so much!

  8. #8
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Change Chart Type

    Good job figuring out the different graph type you needed (xlLineMarkers). I am glad the last code worked for 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. How to change a series chart type from Line to XY-Scatter
    By cartica in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 08-01-2014, 03:08 AM
  2. Replies: 1
    Last Post: 06-14-2011, 09:50 AM
  3. Excel 2003 change a chart type from column to bar
    By masternige in forum Excel General
    Replies: 2
    Last Post: 06-17-2010, 12:08 PM
  4. Change chart type by using data validation
    By jeffreybrown in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 11-28-2009, 09:57 AM
  5. [SOLVED] ... I want to change a chart type ...
    By Dr. Darrell in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-07-2005, 08:05 PM

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.6.0 RC 1