+ Reply to Thread
Results 1 to 8 of 8

I can't figure out why I am receiving a run time error '91'?

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    I can't figure out why I am receiving a run time error '91'?

    Picture1.jpg Picture2.jpgI have used the 'Set' command to set my object and I am still receiving this error message. Everything looks correct to me, but I have missed something somewhere. Here is part of my subprogram:
    Please Login or Register  to view this content.
    Thanks for your help.
    redsab
    Last edited by redsab; 05-11-2014 at 05:29 PM.

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

    Re: I can't figure out why I am receiving a run time error '91'?

    Where do you get the error?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: I can't figure out why I am receiving a run time error '91'?

    Norie,
    Please Login or Register  to view this content.
    Picture2 shows the exact point in my code. Thanks redsab

  4. #4
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: I can't figure out why I am receiving a run time error '91'?

    Hi redsab
    You don't "Set" Long variables
    You need to use something like this
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: I can't figure out why I am receiving a run time error '91'?

    I was a bit vague in the last post, try something like this
    Please Login or Register  to view this content.

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

    Re: I can't figure out why I am receiving a run time error '91'?

    The problem is probably caused by Find failing to find what you are looking for.

    When that happens Nothing is returned, and it you try and find the Row of Nothing you'll get the 'Object Required..' error.

  7. #7
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: I can't figure out why I am receiving a run time error '91'?

    Philb1,
    I tried that and got the same results. I worked with my code and changed things around and nothing worked until I red Norie's post. I checked the values in Sheet1 and I was 100% that they were correct, however, I checked my format on those cells and they were listed as Accounting, when I changed it to Text my program was able to work. Also your code works also. Here is my final subprogram:
    Please Login or Register  to view this content.
    Thank you very much for your help!
    redsab

  8. #8
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: I can't figure out why I am receiving a run time error '91'?

    Norie,
    You were exactly right. I had to change my number format from Accouting to Text and then my program worked fine. Thanks for your help!

    redsab

+ 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. [SOLVED] Formula Tracking Time In Military Format - Receiving Error
    By DDM64 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-22-2013, 05:24 AM
  2. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  3. [SOLVED] Name Split receiving #VALUE! error
    By kazphilips in forum Excel General
    Replies: 3
    Last Post: 06-22-2012, 01:58 PM
  4. Receiving Object Error
    By pawebb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2007, 07:11 PM
  5. [SOLVED] Renamed tab .xls>3 receiving a error but can't fix
    By TB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2006, 11:40 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