+ Reply to Thread
Results 1 to 4 of 4

Run-time Error '9': Subscript out of Range

  1. #1
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Run-time Error '9': Subscript out of Range

    I have some VERY basic code:

    Workbooks("testbook").Activate

    I am getting the error at this line and it's even the first line in my coding. This is the only workbook I have opened at the moment. I have checked over and over again...I know this is the right way to write the code...Based on some research, I believe I might be opening the excel file as an instance. However, this is the first time I've ever heard of an "instance". Why is Excel not recognizing my workbook object? This doesn't make any sense! Please HELP!!!

  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: Run-time Error '9': Subscript out of Range

    If its a excel 2007 file, try
    Please Login or Register  to view this content.
    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
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: Run-time Error '9': Subscript out of Range

    Hey Arlette -

    No, that didnt work..

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

    Re: Run-time Error '9': Subscript out of Range

    What error did you get?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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