Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Dec 2001
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modify Graph Debug (2002)

    Dear Helpers,

    The attached text file gives the VBA code.
    This code is an adaptation from code I got from this helpful site. (Possibly Steve)
    Adaptation changes existing graphs' row references.
    Row numbers are received from a WorkSht CT.

    My difficulty:
    Step Through using F8 through the code, no problem.
    Run DrawCht as Macro|Run|DrawCht, zilch!
    After one loop, gets a Error 13 of Data type Mismatch Error at line marked by arrow.

    Spent hours and still cannot debug.

    Can a kind soul help me out?
    Thanking you in advance.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Modify Graph Debug (2002)

    What is the value in CT!C1, CT!C2 and CT!C3. It sounds like one of them is NOT an integer or is empty

    Perhaps this line:
    Worksheets("CT").Cells(CNo, "C").Value = lngNew
    Should be:
    Worksheets("CT").Cells(ChtNo, "C").Value = lngNew

    Do you have Option Explict ON? CNo is NOT a variable!
    Steve

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modify Graph Debug (2002)

    I commented out this line: ChangeRow1 lngOld, lngNew, ChtNo

    Ran fine in my XL2000, both in debug and in tools/macro/macro.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •