+ Reply to Thread
Results 1 to 9 of 9

Error with Find

  1. #1
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Error with Find

    To briefly describe what I am trying to accomplish, I have a few employees who need to enter their time into a timesheet. The timesheet is by date, employee name, and client number. I have a separate sheet for each client number.

    Time is not entered too often, so I just have simple message boxes to call the name, date, and number of hours, then it will enter it into a range. The problem I am having is when trying to determine the column number of the date and row number of the employee. Here is an excerpt of the code. By the way, I am a beginner, so bear with me please.

    I am receiving run-time error 1004: unable to get the find property of the range class.

    Please Login or Register  to view this content.
    Any suggestions? Thanks!

    By the way, this is in Excel 97.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by jasoncw
    To briefly describe what I am trying to accomplish, I have a few employees who need to enter their time into a timesheet. The timesheet is by date, employee name, and client number. I have a separate sheet for each client number.

    Time is not entered too often, so I just have simple message boxes to call the name, date, and number of hours, then it will enter it into a range. The problem I am having is when trying to determine the column number of the date and row number of the employee. Here is an excerpt of the code. By the way, I am a beginner, so bear with me please.

    I am receiving run-time error 1004: unable to get the find property of the range class.

    Please Login or Register  to view this content.
    Any suggestions? Thanks!

    By the way, this is in Excel 97.
    Ho,

    without setting up a test book, first guess would be that you need

    ActiveSheet.select

    before that nCol =

    if not re-post and I will test.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Quote Originally Posted by Bryan Hessey
    Ho,

    without setting up a test book, first guess would be that you need

    ActiveSheet.select

    before that nCol =

    if not re-post and I will test.

    hth
    ---
    It looks like that helped me get past that hurdle. However, now I have another error:

    Object variable or With block variable not set.

    This occurs on the same line of code.

    Thanks for the input so far.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by jasoncw
    It looks like that helped me get past that hurdle. However, now I have another error:

    Object variable or With block variable not set.

    This occurs on the same line of code.

    Thanks for the input so far.
    good, because I couldn't duplicate the error.

    You have a name that starts with a .

    ie
    .Range(

    you need to remove the . or use a With to define it.

    hth
    ---
    just noted the '97
    Last edited by Bryan Hessey; 12-27-2006 at 05:08 PM.

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Quote Originally Posted by Bryan Hessey
    good, because I couldn't duplicate the error.

    You have a name that starts with a .

    ie
    .Range(

    you need to remove the . or use a With to define it.

    hth
    ---
    just noted the '97
    Ok, you may need to help me along a little bit. I tried changing some code based on your explanation above, but I don't think I did this properly. See the portion I changed below.

    I changed FROM:
    Please Login or Register  to view this content.
    I changed TO:
    Please Login or Register  to view this content.
    Now getting an 'Object doesn't support this property or method' error (same line of code).

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    I didn't stump you, did I, Bryan?

  7. #7
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by jasoncw
    I didn't stump you, did I, Bryan?
    No

    You are asking questions relative only to Excel '97, and as this is a Forum then the question is best answered by someone who has a copy of Excel '97 with which to test the answer.

    Again, this IS a Forum.

    Your error is quite clear, you cannot do what you want to do with the object with which you are trying to do it. It is not a supported method. (stated as Now getting an 'Object doesn't support this property or method' error ) but because that is a legal action in Excel 2003 it would be a guessing game to try to relate back to the long forgotten limitations of the '97 version.

    Try the Help on the Find, or you may need to extract "A19".Value to a variable.as.Range, and take the Col and Row from there. Try the Help on DateRange, or extract the Find to a variable.as.Date and DateRange that variable.
    Does A19 contain a real date? or some 'look-a'like' text?

    Failing those, then someone with a copy of Excel '97, or a better memory, or more knowledge (any of the 3 options an easy possibility) will need to continue with your problem.

    ---

  8. #8
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Quote Originally Posted by Bryan Hessey
    Again, this IS a Forum.
    Wow, looks like I ruffled someone's feathers...
    Quote Originally Posted by Bryan Hessey
    Does A19 contain a real date? or some 'look-a'like' text?
    I've tried it with both a real date and text.

    Does anyone else have any ideas that could help me out? I would really appreciate it.

    Jason

  9. #9
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Just to update, THANKS MSP77079! Based on your response in another thread, I was able to fix my problem.

    http://www.excelforum.com/showpost.p...34&postcount=5

    Using your reply, I came up with the following (abbreviated):

    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