+ Reply to Thread
Results 1 to 8 of 8

Excel VBA error code 91: Object variable or with block variable not set

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Princeton, NJ
    MS-Off Ver
    Excel 2007
    Posts
    5

    Excel VBA error code 91: Object variable or with block variable not set

    Is there any known reason a user of workbook would get the error code 91, but someone else does not?
    I cannot really debug the code since I am not getting the error and it's not practical for me to be at the users' machine, nor for me tell them which step to take to help me debug it.

    Thanks in advance for your help.

  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: Excel VBA error code 91: Object variable or with block variable not set

    Do you know where they get the error?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    Princeton, NJ
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel VBA error code 91: Object variable or with block variable not set

    As soon as the user opens the files. They can't see the codes since they are protected and I can't give them the password unfortunately.
    Last edited by wilnexpc; 07-23-2013 at 02:17 PM.

  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: Excel VBA error code 91: Object variable or with block variable not set

    It's kind of hard to help then I'm afraid.

    There could be a numbe of reasons for that error and it could occur in various places in the code.

    Does the user with the problem have any differences in settings?

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    Princeton, NJ
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel VBA error code 91: Object variable or with block variable not set

    I am pretty sure they would have different settings, they are a client company of ours.
    My plan is to test the workbook at home on my personal machine and see if I get the same error.
    Last edited by wilnexpc; 07-23-2013 at 02:29 PM.

  6. #6
    Registered User
    Join Date
    07-10-2013
    Location
    Princeton, NJ
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel VBA error code 91: Object variable or with block variable not set

    It turned out they were using a different version of excel than I am. There some missing libraries in the Reference Library under Tools in the VBE. Fixing that took care of the problem. A guy named Rollin helped me out.
    Thanks again Norie, your pointing out the possible difference in settings help solve the problem
    Last edited by wilnexpc; 07-24-2013 at 11:18 AM.

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

    Re: Excel VBA error code 91: Object variable or with block variable not set

    Glad to hear you got it sorted.

    I wondered if it was a reference problem but assumed you had checked that.

  8. #8
    Registered User
    Join Date
    07-10-2013
    Location
    Princeton, NJ
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Excel VBA error code 91: Object variable or with block variable not set

    I am fairly new at this, and work on and off with VBA, so I still have a lot to learn.

+ 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. Replies: 6
    Last Post: 12-21-2012, 08:03 AM
  2. Error 91 object variable block variable not set when importing a CVS file
    By ReportBuilder2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2011, 11:48 AM
  3. Object Variable or With Block Variable Not Set- Error on Another User Machine
    By dailem in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2010, 09:28 AM
  4. Find Method error: -Object variable with block set variable not set
    By bambino_32 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-02-2010, 01:18 AM
  5. Error Code 91 Object Variable or With Block variable Not Set
    By florencia in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2008, 04:46 AM

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