none
Delete a reference that no longer exists RRS feed

  • Question

  • I have been trying to move .Net library over to Access but I have been having trouble.

    I have put a myFile.tlb file into SysWOW64 and registered it in that file but I have since deleted that file and moved it to a different folder and registered it there.

    The problem is I want to now use the new myFile.tlb file as a reference in access but access still has the old myFile.tlb file that was in SysWOW64 listed in references and I can't replace the old file with the new one.

    Is there a way to remove the old myFile.tlb file from available reference even though it was already deleted from the SysWOW64?

    Thursday, June 7, 2018 11:07 AM

Answers

  • You would need the type library file to unregister using the regtlib utility. Otherwise, it will be a manual process of removing the type library references from the Windows Registry.

    If this is a .NET assembly registered for COM interop you should be able to use the Regasm utility to unregister the assembly (.dll) file for which the tlb file was created. That is, assuming you have the .dll file.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by patreilly Sunday, June 17, 2018 6:03 PM
    Thursday, June 7, 2018 1:00 PM
  • You should in the VBA editor just go tools->references, and remove the old one. then you can re-add the new one.

    However if the registered assembly has the same "com" object name, then you may not have to do the above. However, I would due to the location change STILL remove the reference, and then re-add it.

    Regards,

    Albert D. Kallal (Access MVP, 2003-2017)

    Edmonton, Alberta Canada

    • Marked as answer by patreilly Sunday, June 17, 2018 6:04 PM
    Tuesday, June 12, 2018 6:41 PM

All replies

  • You would need the type library file to unregister using the regtlib utility. Otherwise, it will be a manual process of removing the type library references from the Windows Registry.

    If this is a .NET assembly registered for COM interop you should be able to use the Regasm utility to unregister the assembly (.dll) file for which the tlb file was created. That is, assuming you have the .dll file.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by patreilly Sunday, June 17, 2018 6:03 PM
    Thursday, June 7, 2018 1:00 PM
  • It was a .Net assembly and I had deleted the .dll, but I had a copy of it.

    I then re added the file to SysWOW64 so I could unregister it with Regasm and then I deleted it again.

    But the file remained in the VBA reference list and I am unable to add the new one.

    Thursday, June 7, 2018 2:25 PM
  • You should in the VBA editor just go tools->references, and remove the old one. then you can re-add the new one.

    However if the registered assembly has the same "com" object name, then you may not have to do the above. However, I would due to the location change STILL remove the reference, and then re-add it.

    Regards,

    Albert D. Kallal (Access MVP, 2003-2017)

    Edmonton, Alberta Canada

    • Marked as answer by patreilly Sunday, June 17, 2018 6:04 PM
    Tuesday, June 12, 2018 6:41 PM
  • It was a .Net assembly and I had deleted the .dll, but I had a copy of it.

    I then re added the file to SysWOW64 so I could unregister it with Regasm and then I deleted it again.

    But the file remained in the VBA reference list and I am unable to add the new one.


    Unregistering with Regasm should take care of it, provided you have the assembly with the correct COM interfaces. If you have multiple versions you may need to try it several times. Otherwise, like I said you will probably need to manually remove the references using Regedit or a Registry cleaner utility.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, June 13, 2018 3:31 PM