+ Reply to Thread
Results 1 to 9 of 9

Runtime Error "91" - Object Variable or With Block Variable not set

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    11

    Runtime Error "91" - Object Variable or With Block Variable not set

    Good day All,

    I'm new to the forum and this is my first post. Please pardon me if its not quite what you'd expect. I have this piece of code I copied and modified, its supposed to populate an adjacent column with a date when a given column (cell) is marked as "Solved". Please find below the piece of code generating the error. Thanks for you anticipated responses.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Try this version -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Thank you very much for the response, I was able to get this to work on a test sheet but it didn't work when I modified the sheet I really need it to work on. I have attached the sheet, kindly help look at it
    Attached Files Attached Files

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Try it like this

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    03-04-2013
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Thanks for the response. It still doesn't work though. I wonder what the problem is.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    I don't know. Using your sample I type in solved in column k and the date is added to column L. Does your uploaded example workbook not work for you?
    Last edited by mike7952; 03-05-2013 at 04:36 AM.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    I tried the file in post 3 and it works. I enter solved in column K, press enter and the date shows up in column L.

  8. #8
    Registered User
    Join Date
    03-04-2013
    Location
    Lagos, Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Thanks a lot, it works on another machine. Apologies for the false alarm . Thank you very much guys, I appreciate.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Runtime Error "91" - Object Variable or With Block Variable not set

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help 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