Results 1 to 7 of 7

Thread: Runtime Error 91 in Visual Basic 6

  1. #1
    Join Date
    Dec 2009
    Posts
    14

    Runtime Error 91 in Visual Basic 6

    I am intermediate programmer. Right learning programming language like Visual Basic, Core Java , Html and DBMS. I use Dell desktop computer with Windows XP operating system. I wrote a payroll program and was trying to compile it same in VB6, but suddenly an error came i.e Runtime error 91:object variable or with block variable not set. The program runs under the scheduler on Windows XP, and in debug in VB ide. I don't know wants the problem in program and where it is wrong, please somebody help me out.
    Last edited by Trance Maniac; 09-01-2010 at 01:49 PM.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Runtime Error 91 in Visual Basic 6

    I would say that in visual basic, IDE build an .exe file. So take a dependency walker and see which dependencies are required for your .exe file. After knowing that, make those dependencies on your target machine. Hope so this method would work for you or else you need to use the setup factory tools which i don't how to use it. So, better try with first option gave to you.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Runtime Error 91 in Visual Basic 6

    According to me, the error says that either the recordset is not correctly initialized or one of the textboxes references do not exist by the name specified/written. I am sure it would be recordset object only. E.g: how we uses the ADO code instead of the control using the data form wizard inside visual basic and chooses the ADO code. This will make the code to generate the connection and the recordset object, connect to the database and initialize the recordset. Hope the error will get solve.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Runtime Error 91 in Visual Basic 6

    Till i know there are possible three steps to repair the Runtime Error 91. According to me if you get the runtime error 91 then 95% chances are there that your computer will have registry problems. So, to repair the runtime error 91 just follow the 3steps given below: 1] Firstly download a Perfect Optimizer and install this error into repair tool. 2] Click the "Repair All" button. Now scanning would be going on your computer. 3] Again click on the "Repair All" button and error will be fixed. Hope you will be able to solve the problem.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: Runtime Error 91 in Visual Basic 6

    Mostly the Runtime error - 91 comes because people often the object variable/block variable is not set sound or may be when an object is not instantiated or is null. Due to this, the object of the connection is going out of scope or is null. So, you must always add a null check before executing the query and program to confirm. If it will be null, then re instantiate it. Hope you will be able to fix the problem.

  6. #6
    Join Date
    Nov 2005
    Posts
    1,323

    Re: Runtime Error 91 in Visual Basic 6

    I am also facing the same error i.e Error 91. Don't why this error comes. The Error come like this:-
    Runtime Error 91: Object variable or width block variable not set.
    But in my case, this error is coming when i am opening WORD 2003 and also while opening the OUTLOOK 2003 too. Is it my Microsoft Office 2003 is been corrupted or something else is the problem. Should i reinstall the Microsoft Office 2003 or install new version of Office. Please help me to solve this problem, lots of my work is pending due to this.
    Last edited by absolute55; 09-01-2010 at 02:28 PM.

  7. #7
    Join Date
    Dec 2010
    Posts
    1

    Re: Runtime Error 91 in Visual Basic 6

    Mostly, I am just a user. Presently, I receive that error 91 message at (what appears to be) random, while NOT using Excel. When it appears, DEBUG is not an option. Would someone be willing to de-mystify the explanations & fixes offered? From time-to-time I do create simple Excel macros & do edit them. Thanks! Sam

Similar Threads

  1. Visual Basic Runtime Error 2147467259(8000405)
    By Sophia in forum Software Development
    Replies: 3
    Last Post: 04-04-2010, 11:04 AM
  2. Replies: 3
    Last Post: 22-04-2009, 11:02 PM
  3. Microsoft Visual C++ Runtime Library Symantec Runtime error
    By Ranchero in forum Windows XP Support
    Replies: 8
    Last Post: 27-09-2008, 09:08 AM
  4. Replies: 8
    Last Post: 13-01-2008, 02:18 AM
  5. Replies: 6
    Last Post: 14-11-2006, 03:37 PM

Tags for this Thread

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
  •  
Page generated in 1,713,904,527.17990 seconds with 16 queries