+ Reply to Thread
Results 1 to 4 of 4

Mid statement object reference error.

  1. #1
    Forum Contributor
    Join Date
    06-15-2007
    Location
    Scotland
    Posts
    142

    Mid statement object reference error.

    I have an application that is working in my machine, but when I bring it to another user machine didn;t work.

    I use some of the VBA string manipulation functions such as Mid, Instr etc.
    Everyone is using Excel 2003 SP-3, and in the other machine is 2002 SP-3
    all security level are setted low.

    However one the other user gets an error on the Mid statement "Cannot find Project or Library".

    However i do not have this problem in other computers.

    I checked that the references in VBA are identical, so I am a bit in the dark here.
    Any comments or suggestions to what is going on?

    Can i make an executable file that bring me everything that I need, so I can transport the file every were in any machnie and make it work?
    thanks very much

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello mmf,

    I have had this problem in the past. I have found that the VBA portion of Excel becomes corrupted. The rest runs fine. This method has worked for me...

    Rebuild Excel from the Command Line
    1. Click Start, and then click Run...
    2. In the Open box type this Excel.exe /unregserver
    3. Excel will run then close.
    4. Click Start, snd then click Run...
    5. In the Open box, type Excel.exe /regserver
    6. Excel will run then close.

    This will rewrite all of Excel's registry keys and reassociate itself with Excel files, such as workbooks, charts, and others.

    Sincerely,
    Leith Ross

  3. #3
    Forum Contributor
    Join Date
    06-15-2007
    Location
    Scotland
    Posts
    142
    Leith
    thanks very much for the suggestion, I tried that one but unfortunatly didn't work. Any other idea what could be the problem?
    thanks very much
    Marcos

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Marcos,

    The only other option would be to have the user re-install Excel on their machine, and make sure all the VBA components are installed this time.

    Sincerely,
    Leith Ross

+ 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