+ Reply to Thread
Results 1 to 3 of 3

Assign sheet to variable fails Error 9 (

  1. #1
    Registered User
    Join Date
    03-03-2005
    Posts
    41

    Assign sheet to variable fails Error 9 (

    I get a subscript error when trying to assign a worksheet to a variable
    The Sheet name is correct (line3 . . . = "Value")
    But line 4 throws an error 9

    Please Login or Register  to view this content.
    I am clearly missing something basic here.
    TFAI

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Assign sheet to variable fails Error 9 (

    Is that the exact code? It looks like it should work -- except for the Unicode "left quote" and "right quote" characters (characters 8220 and 8221). If that is your exact code, you need to use regular quote characters in VBA (character 34).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    03-03-2005
    Posts
    41

    Re: Assign sheet to variable fails Error 9 (

    Thank you

    Well spotted

    That's what copy and paste and do to you!!

    (Seriously unhelpful error message - again!)

+ 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. Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  2. [SOLVED] Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  3. Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. [SOLVED] Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] Variable VB to assign new sheet name
    By Kevin M in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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