none
Name Conflict and Replace Reference Location in Visual Basic 2010 RRS feed

  • Question

  • I need to replace the location of a referenced VBAproject but nothing I've done so far is working.

    There are two files T.xls and V.xls.  T.xls is referencing V.xls as a VBAproject. These two files need to be relocated to another computer in an unknown folder. As a trial when T and V are both moved to a new computer and a different folder, the T file is still referencing V with the old location. Under Tools -> Reference browser, I unchecked the reference to the VBAproject of the old V.xls location. Then saved T.xls with no reference, reopened it, and tried to add the V.xls Reference at the new file location.

    However, an error message shows up: "Name conflicts with existing module, project, or object library"

    This is such a simple problem. Can someone help?

    Tuesday, February 25, 2014 11:22 PM

Answers

  • Hi Felisaaero,

    Try changing the name of both VBA projects so they are unique, before setting the reference. Tools, VBAProject properties.


    Regards, Jan Karel Pieterse|Excel MVP|http://www.jkp-ads.com
    • Marked as answer by felisaaero Wednesday, February 26, 2014 6:58 PM
    Wednesday, February 26, 2014 6:30 AM

All replies

  • Hi,

    I'm afraid that it is not the correct forum about this issue, since this forum is to discuss Visual Basic.

    So I have moved this thread to VBA forum for better response.

    Thanks for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 26, 2014 2:24 AM
  • I suspect that this relates to the persistence issue which Office 2010 has adopted. If you close Excel completely between removing and adding back the reference it should be OK. I don't know if it is otherwise possible to clear the memory that the VBA editor retains while the application is open. I think that idea is to aid crash recovery, but it causes as many problems as it solves.

    Graham Mayor - Word MVP
    www.gmayor.com

    Wednesday, February 26, 2014 5:14 AM
  • Hi Felisaaero,

    Try changing the name of both VBA projects so they are unique, before setting the reference. Tools, VBAProject properties.


    Regards, Jan Karel Pieterse|Excel MVP|http://www.jkp-ads.com
    • Marked as answer by felisaaero Wednesday, February 26, 2014 6:58 PM
    Wednesday, February 26, 2014 6:30 AM
  • Hi Can you send me a link to the relocated thread? Sorry new at this.

    Felisa

    Wednesday, February 26, 2014 6:32 PM
  • I changed the names VBAproject to VBAproject1 & VBAproject2 and it worked. The strange thing is that it didn't matter on XP. Thanks!
    Wednesday, February 26, 2014 6:59 PM