+ Reply to Thread
Results 1 to 8 of 8

Changing row count from 5 to 7 causing error message

  1. #1
    Registered User
    Join Date
    06-07-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016, 64 bit
    Posts
    5

    Changing row count from 5 to 7 causing error message

    Hi All,
    I have the following coding (not written by me) that I need to change so coding so "For lngCnt2 = 1 To 5" is "For lngCnt2 = 1 To 7". The coding is used to populate a table that is used to build a chart.

    When I run the coding after the change to test it, it works, the chart builds and I get no error message. BUT when I close the whole work sheet and try to use it again it throws the error "Application defined or object defined error" and I can no longer use the work book. I have been trying to figure out the problem, but I just can't see why it works until I open the whole work book. Any assistance would be greatly appreciated!

    Coding for populating the table:

    Please Login or Register  to view this content.
    Coding for building the chart:

    Please Login or Register  to view this content.
    Last edited by ALEXANAF; 06-07-2018 at 09:50 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Changing row count from 5 to 7 causing error message

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, 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

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-07-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016, 64 bit
    Posts
    5

    Re: Changing row count from 5 to 7 causing error message

    thanks for letting me know. Fixed now.

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Changing row count from 5 to 7 causing error message

    Where is your code contained in the workbook (module?).

    Where are the sub names?

  5. #5
    Registered User
    Join Date
    06-07-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016, 64 bit
    Posts
    5

    Re: Changing row count from 5 to 7 causing error message

    Hi, the coding is in two separate modules. The coding I have extracted from much larger subs, one for generating data to fill all the tables in the workbook, the other to build all the charts in the work book. Do you need to see all the coding from both subs?

  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Changing row count from 5 to 7 causing error message

    If you can attach a workbook with the code and some sample data that would be good.

    Go Advanced -> Manage Attachments -> Upload

  7. #7
    Registered User
    Join Date
    06-07-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016, 64 bit
    Posts
    5

    Re: Changing row count from 5 to 7 causing error message

    I have uploaded it I think.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-07-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2016, 64 bit
    Posts
    5

    Re: Changing row count from 5 to 7 causing error message

    The subs in questions are called "GetRptNumericalData" and "CreateChart_ChtConformSumry"

+ 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] Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  2. Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  3. Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  4. [SOLVED] Formula Causing a Save Error Message
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 09:05 AM
  5. [SOLVED] Formula Causing a Save Error Message
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 08:05 AM
  6. [SOLVED] Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  7. [SOLVED] Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. [SOLVED] Formula Causing a Save Error Message
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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