+ Reply to Thread
Results 1 to 9 of 9

Can't find cause of "This command requires at least two rows of source data" Warning

  1. #1
    Registered User
    Join Date
    11-13-2009
    Location
    Cumbria
    MS-Off Ver
    Excel 2016
    Posts
    87

    Can't find cause of "This command requires at least two rows of source data" Warning

    Hi Everyone,

    I am using a workbook with VBA programming and over 10 worksheets. Recently, it has started giving me the "This command requires at least two rows of source data" warning every time I open it. I have no idea which sheet/cells are causing this warning. Is there any simple way of finding out?

    Many thanks in advance,

    Rowan

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    Is there any code set to run when you open the file? Is it a sort code?

    To check if the code exists, open the file, press Alt+F11, on the left hand side you will see ThisWorkbook. See if there is any code on the right hand side.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    11-13-2009
    Location
    Cumbria
    MS-Off Ver
    Excel 2016
    Posts
    87

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    This is the Workbook_Open event code:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 04-08-2013 at 07:22 AM. Reason: Code tags not quote tags.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    I don't think that is the code that's causing the error.

    Is there any other code in the worksheet?

    Also, when you get the error is there an option to debug and does it happen when you do something specific, eg select a particular worksheet?
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    11-13-2009
    Location
    Cumbria
    MS-Off Ver
    Excel 2016
    Posts
    87

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    Thanks for the responses. The only code that is specific to the worksheet is:

    Please Login or Register  to view this content.

    The warning message seems to appear regardless of what worksheet was open when I saved the workbook. I don't get any option to debug when the warning appears. I get the warning message every time I open the workbook.
    Last edited by arlu1201; 04-08-2013 at 07:49 AM. Reason: Next time please use code tags for code.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    11-13-2009
    Location
    Cumbria
    MS-Off Ver
    Excel 2016
    Posts
    87

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    Thanks for offering to look at it. Unfortunately, it contains a lot of company data that I shouldn't be distributing and it might be tricky/time-consuming altering the data for illustrative purposes. Such a shame. Would be great if you could look at it.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    Rowan

    Can you tell us what's going on in the workbook?

    Are there any pivot tables?

    Any sorting/filtering?

    Anything?

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Can't find cause of "This command requires at least two rows of source data" Warning

    do you have any pivot tables in the workbook that refresh on open? if the data source is now blank that could cause that message
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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