+ Reply to Thread
Results 1 to 5 of 5

Error in http://www.exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Exc

  1. #1
    Registered User
    Join Date
    08-26-2005
    Posts
    21

    Arrow Error in http://www.exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Exc

    Hi All,

    I was trying to execute the macro on the link: http://www.exceltip.com/st/Compare_...xce l/477.html

    But I get the error: "Run time error 9 : Subscript out of range" when I try to compare 2 workbooks.

    The line where i get error is:

    CompareWorksheets ActiveWorkbook.Worksheets("Sheet1"), _
    Workbooks("WorkBookName.xls").Worksheets("Sheet2")

    I even tried renaming the file on my system to workbookname.xls.....but it just doeesnt work.

    Please advise...

    Regards,

    Jatz

  2. #2
    Tom Ogilvy
    Guest

    Re: Error in http://www.exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Exc

    This would mean that you are trying to reference a sheet or workbook which
    does not exist.

    --
    Regards,
    Tom Ogilvy


    "JAtz_DA_WAY" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi All,
    >
    > I was trying to execute the macro on the link:
    > http://www.exceltip.com/st/Compare_...xce l/477.html
    >
    > But I get the error: "Run time error 9 : Subscript out of range" when I
    > try to compare 2 workbooks.
    >
    > The line where i get error is:
    >
    > CompareWorksheets ActiveWorkbook.Worksheets("Sheet1"), _
    > Workbooks("WorkBookName.xls").Worksheets("Sheet2")
    >
    > I even tried renaming the file on my system to workbookname.xls.....but
    > it just doeesnt work.
    >
    > Please advise...
    >
    > Regards,
    >
    > Jatz
    >
    >
    > --
    > JAtz_DA_WAY
    > ------------------------------------------------------------------------
    > JAtz_DA_WAY's Profile:

    http://www.excelforum.com/member.php...o&userid=26684
    > View this thread: http://www.excelforum.com/showthread...hreadid=399592
    >




  3. #3
    Registered User
    Join Date
    08-26-2005
    Posts
    21
    But the problem is that the file exists & with the exactly same name....

  4. #4
    Registered User
    Join Date
    08-26-2005
    Posts
    21
    And also in the same directory !!

  5. #5
    Dave Peterson
    Guest

    Re: Error in

    You have one more guess at your post in .misc.



    JAtz_DA_WAY wrote:
    >
    > And also in the same directory !!
    >
    > --
    > JAtz_DA_WAY
    > ------------------------------------------------------------------------
    > JAtz_DA_WAY's Profile: http://www.excelforum.com/member.php...o&userid=26684
    > View this thread: http://www.excelforum.com/showthread...hreadid=399592


    --

    Dave Peterson

+ 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