+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Invalid Parameter

  1. #1
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44

    Invalid Parameter

    I'm getting a Runtime Error of an invalid parameter for this line of
    Please Login or Register  to view this content.
    That line of code is in this sub
    Please Login or Register  to view this content.
    So how do I fix the parameter?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    Does the activechart have enough series for you to use series collection 2?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44
    When taking a look at the chart I believe that the chart only requires one series. Would I be able to email you the file, so you could take a look at it for me?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    Well if the chart only has 1 series trying to select the 2nd or 3rd will cause an error.

    You should really check the SeriesCollection.Count property before do the code relating to series.

  5. #5
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44
    When getting more information about the workbook, I realized that their were more charts that were suppose to show and not one. I'm going to email you the file so you can try to help me with my problem.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    As I said you need to test for valid series before trying to format it.

    Please Login or Register  to view this content.
    BTW chart sheets can not contain textboxes from the control toolbox.
    You need to add shapes and add text to them

  7. #7
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44
    Okay thanks. And if you look look in Module 1 of that file the line of
    Please Login or Register  to view this content.
    Sometimes give off an error which says that 'Run-time error '1004':Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic. ' Is it because when I run the macros of code it keeps on making up the same sheet with the same name? I deeply appreciate your help.

  8. #8
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44
    The problem I'm having is that my program works completely fine in Excel 2003, but for Excel 2007 it shows errors. Why is this you think?

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    This error has nothing to do with versions it to do with trying to name sheets with names that already exist.

    First time your workbook opens the sheets are all created.
    Second time it just does the same thing again only the sheet already exists.

    Add this routine and code to stop creation if already present.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-22-2008
    Location
    New Jersey
    Posts
    44
    Thanks man. You are the best.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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