+ Reply to Thread
Results 1 to 4 of 4

Update all charts in workbook except 2 sheets, change all series

  1. #1
    Registered User
    Join Date
    08-02-2010
    Location
    UK
    MS-Off Ver
    Office 365 Home
    Posts
    39

    Update all charts in workbook except 2 sheets, change all series

    Evening all,

    I'm trying to adapt this piece of code
    HTML Code: 
    to run through all graphs in my workbook (about 60 in all) and update the line thickness and remove glow. There are graphs on Sheets 1 & 2 that I dont want this to happen on.

    The way I've currently got it written it gives me a Compile Error: Next without For

    As far as I understand there are 3 "Fors" above with 3 "Nexts" below.

    Any help greatly appreciated.


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    372

    Re: Update all charts in workbook except 2 sheets, change all series

    You are missing one End With statement:

    Please Login or Register  to view this content.
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    Registered User
    Join Date
    08-02-2010
    Location
    UK
    MS-Off Ver
    Office 365 Home
    Posts
    39

    Re: Update all charts in workbook except 2 sheets, change all series

    Hello Hydraulics

    Thanks for your answer, thats certainly got rid of the Compile error. Now for some reason it doesn't think that the
    Please Login or Register  to view this content.
    element has been specified, despite sht being defined at the top.

    Weird, because a similar script is working fine in another module. Any ideas?

  4. #4
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    372

    Re: Update all charts in workbook except 2 sheets, change all series

    Without seeing your workbook it's somewhat hard to tell what you should change, but this statement

    Please Login or Register  to view this content.
    should follow, and not precede, this line

    Please Login or Register  to view this content.
    As it is now, it will complain that you are trying to access the name of the sheet (sht.Name) when you have only declared it at the top.

    Try with

    Please Login or Register  to view this content.

+ 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 Excel charts series at one go?
    By Eurobeater in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-20-2018, 03:48 AM
  2. How to auto update charts from new sheets.
    By David.McClellan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-05-2017, 04:03 PM
  3. [SOLVED] Delete all charts and empty rows from all sheets; won't change sheets
    By astrbac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-29-2015, 10:12 AM
  4. [SOLVED] Change series colour for all charts on a worksheet.
    By DonaldDump in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 06:12 PM
  5. [SOLVED] Is it possible to dynamically update a charts data series, based on another cell
    By missydanni in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-14-2013, 11:29 AM
  6. Replies: 1
    Last Post: 06-21-2006, 04:50 PM
  7. How can you add the same data series to all charts in a workbook
    By MBubier in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-30-2006, 10:20 AM

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