+ Reply to Thread
Results 1 to 5 of 5

Selecting Range with Target cell

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    Over, There
    MS-Off Ver
    Excel 2016
    Posts
    44

    Selecting Range with Target cell

    I'm trying to select a range of cells with the Target address but I'm getting "Object Required" error. What I have is:

    Please Login or Register  to view this content.
    I remember having this problem before I just can't remember how I fixed it.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: Selecting Range with Target cell

    It would be better if you posted the workbook so this line of code can be seen in the context of the module and the data.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Selecting Range with Target cell

    I'm going to guess (and assuming Target is actually a valid object in this context):
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    11-05-2010
    Location
    Over, There
    MS-Off Ver
    Excel 2016
    Posts
    44

    Re: Selecting Range with Target cell

    I tried the code but I get the same error. What I have is:

    Please Login or Register  to view this content.


    EDIT: I got it, Target was not a valid object. I had to assign a variable before calling the sub.
    Last edited by Demon4231; 04-14-2011 at 12:25 PM.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Selecting Range with Target cell

    Change this:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    and replace this:
    Please Login or Register  to view this content.
    with:
    Please Login or Register  to view this content.

+ 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