+ Reply to Thread
Results 1 to 4 of 4

Select Method of Range class fail

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Select Method of Range class fail

    Code selects a cell on the Report sheet, then looks for the matching cell in Row 1 of the Database.

    As shown on the attached, it seems to "find" the matching cell, but when asked to select the cell it generates a RunTime 1004 Error

    Can't see why, and it's the same syntax I've used almost continuously for years?

    All solutions, suggestions or pointers received gratefully as ever

    Ochimus
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Select Method of Range class fail

    You're trying to select a cell that's not on the active sheet.

    Activate "DATABASE" first, then select "MATCHED".

    BSB

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Select Method of Range class fail

    Badly,

    Major apologies for not responding promptly.

    I was sure I thanked you at the time, but obviously missed something out, because I've just seen I have a number of "open" queries including this one!

    I was trying to avoid using either "Activate" or "Select", which obviously slow things down, and using them is clearly seen as "Not a Good Thing" on most Forums, but ended up using your approach.

    Ochimus

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select Method of Range class fail

    If all you want to do is go to the found cell you could use Application.Goto.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

+ 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. .select method with worksheets object ex. Sheets("Sheet1").range.select fail
    By RobCan in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-19-2014, 07:01 PM
  2. [SOLVED] PasteSpecial Method of Range Class Fail
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-26-2013, 04:40 AM
  3. [SOLVED] Copy Method of Range Class Fail
    By Gard5096 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 03:27 PM
  4. PasteSpecial method of Range class Fail from one workbook to another
    By jasondu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2012, 03:40 PM
  5. Close WB "Select Method Range Class Fail"
    By konichiwa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-28-2011, 05:09 AM
  6. 1004 error autofill method of range class fail
    By plato in forum Excel General
    Replies: 1
    Last Post: 01-29-2010, 06:11 AM
  7. Select method of range class error?
    By robbert in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-13-2008, 12:58 PM

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