+ Reply to Thread
Results 1 to 5 of 5

Getting "Object variable or With block variable not set" error with Find function

  1. #1
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Getting "Object variable or With block variable not set" error with Find function

    I am trying to allow a user to double-click on a cell in column 2 on Sheet1 and it will take them to a cell on a different worksheet where the date matches the date that is on the same row in column 1 on Sheet1. Code is below:

    Please Login or Register  to view this content.
    I am getting the error on the line with the range.find. I've tried multiple ways to write it but keep getting the error.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Getting "Object variable or With block variable not set" error with Find function

    Please Login or Register  to view this content.
    if you want to use a find/match function

  3. #3
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Re: Getting "Object variable or With block variable not set" error with Find function

    Thanks for the reply but it's still not working. I need the row where the date matches. I changed the variable type to "Object" and changed "Sheets(fSheet).Cells(fRow, 1).Select" to "Sheets(fSheet).Cells(fRow.row, 1).Select" but still getting the error, except on the aformentioned line.

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

    Re: Getting "Object variable or With block variable not set" error with Find function

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Re: Getting "Object variable or With block variable not set" error with Find function

    That worked perfectly, thank you!!

+ 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