+ Reply to Thread
Results 1 to 3 of 3

Method 'Range' of object '_worksheet' failed

  1. #1
    Forum Contributor
    Join Date
    09-02-2005
    Posts
    146

    Method 'Range' of object '_worksheet' failed

    I'm trying to select a range that will be changing by column. I'm not sure why my syntax isn't working.

    What I've got:
    Please Login or Register  to view this content.
    I'm using the above code for debugging purposes. The column number will be incremented in a loop (I.E. 3->4->5...)

    What I want is something like this:
    Please Login or Register  to view this content.
    Are there any ideas for why this isn't working?
    Last edited by wilro85; 01-06-2010 at 06:24 PM.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Method 'Range' of object '_worksheet' failed

    You either need to access the address property of the cells object, or you need to fully qualify the Cells objects and avoid string conactenation altogether. It should work if you write like this:

    Please Login or Register  to view this content.
    or like this (assumes a ChartSheet isn't active):

    Please Login or Register  to view this content.
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Forum Contributor
    Join Date
    09-02-2005
    Posts
    146

    Re: Method 'Range' of object '_worksheet' failed

    Accessing the address worked fine. Thank you very much.

+ 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