+ Reply to Thread
Results 1 to 2 of 2

Error 9 Out of subscript when selecting sheets

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    19

    Error 9 Out of subscript when selecting sheets

    Hi

    I keep getting the error 9 ( out of subscript range) on this line in my code and all file names are correct any ideas??

    sheets("WG" & wg).Select
    Thanks

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Error 9 Out of subscript when selecting sheets

    Check the value of wg variable and check whether the sheet is having any extra spaces.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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] Subscript error from Selecting array of sheets
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 03:13 AM
  2. [SOLVED] Select Sheets based on variable array -ERROR 9 Subscript out of range
    By airmiles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 07:28 PM
  3. Defining Array - Runtime error 9, Subscript out of range error
    By MaartenW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2012, 07:32 AM
  4. Runtime Error - Subscript out of range despite On Error statement
    By DoctorG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2006, 11:05 AM
  5. Subscript out of range error - save copy error
    By bg18461 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2006, 11:53 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