+ Reply to Thread
Results 1 to 6 of 6

Run-Time Error 2023

  1. #1
    Registered User
    Join Date
    08-30-2011
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    4

    Run-Time Error 2023

    Evening All

    I've been using the below code to change the data range within the workbook for ages and now all of a sudden it's not working:

    All I do is increase the range by one column every week

    Sub ChangeAllCharts()
    Dim sht As Worksheet
    Dim cht As ChartObject
    Dim ser As Series

    For Each sht In ActiveWorkbook.Worksheets
    For Each cht In sht.ChartObjects
    For Each ser In cht.Chart.SeriesCollection
    ser.Formula = Replace(ser.Formula, ":$CY$", ":$CZ$")
    Next ser
    Next cht
    Next sht
    End Sub

    Thanks for any help.
    Stewart
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    08-30-2011
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Run-Time Error 2023

    Sorry forgot to show debug
    Attached Images Attached Images

  3. #3
    Registered User
    Join Date
    08-30-2011
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Run-Time Error 2023

    Any ideas anyone ???

  4. #4
    Registered User
    Join Date
    08-30-2011
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    4

    Thumbs up Re: Run-Time Error 2023

    Fixed it :)

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,600

    Re: Run-Time Error 2023

    Administrative Note:

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    03-23-2022
    Location
    Canada
    MS-Off Ver
    2019 Pro
    Posts
    1

    Re: Run-Time Error 2023

    Cold you tell us how you fixed it?? I made an account just to ask this ahah

+ 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] Error 2023: How to identify cell in For Each Loop?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-12-2018, 12:21 AM
  2. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  3. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  4. Cannot Publish Excel Pivot Chart - Run Time Error
    By crisb184 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2013, 07:04 AM
  5. run-time error ;2147023179 (800706b5) time automation error interface unknown
    By karthik72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 09:31 AM
  6. [SOLVED] Error 2023 - triggered by variable - Cant find mistake
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2012, 09:11 AM
  7. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 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