Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Posts
    21

    Unanswered: Object variable or With block variable not set (Error 91)

    THis might be the most dummest question but i get this error even tho that specific variable is defined and set properly. Im dealing with more than one of these errors at random times when execute different stage of my project. Im dealing with visible property of worksheets. And sometimes it work sometimes it doesnt, any ideas.

  2. #2
    Join Date
    Jun 2006
    Posts
    103
    Quote Originally Posted by Amazing_Spiderman
    THis might be the most dummest question but i get this error even tho that specific variable is defined and set properly. Im dealing with more than one of these errors at random times when execute different stage of my project. Im dealing with visible property of worksheets. And sometimes it work sometimes it doesnt, any ideas.

    then probably is your reference causing the problem. did you develop and run program in different version of OS or office?

    For example, if you developed your program in winxp with office2003, then run on win2k and office 2k, in the reference you will get Microsoft excel object 11.0 (this is for office2003) and office2k is using 9.0

    this will happen even if you just open the excel template with xp, once it use 11.0, unless you manual set it back to 9.0, it will continue using 11.0 which might cause problem.

    just check your reference, see if anything missing there. sometimes is some ocx that you r using that is missing

  3. #3
    Join Date
    Mar 2006
    Posts
    163
    Can you post the code?

  4. #4
    Join Date
    Aug 2006
    Posts
    21
    actually it was very simple I had to just reinitialize my sheets so it would load properly. its always good to look over it with a different look.

  5. #5
    Join Date
    Jun 2006
    Posts
    103
    so is working now?

  6. #6
    Join Date
    Aug 2006
    Posts
    21
    yes thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •