I have created a dll (written in c) which I wish to use from VBA. I have taken the steps documented in KB189133 and in KB122285 and I end up with a dll which has a type library included and visible using the OLE view tool (supplied with MS Visual C++). However, when I try to add the type library information by using tools>references and browsing to the dll, it does not pick up the reference. it flicks and does nothing. No error message, and no new ticked item in the references. If I browse to the TLB, then it all works OK, but I would like to have just one file to distribute, and the included typelib would be just the job. The situation is the same in excel and access and VB6. Anyone any clues??
Replying to my own message, it works with access on one PC and not on another. Same version, and same version of VBA (VB 6.3). So is suspect something I am doing (or not doing) differently on the two machines.
The problem went away when I put a new uuid in the odl file defining the type library. I am not sure what this fixed, but I just created a new one with guidgen and it worked. I presume it is something to do with making hundreds of mistakes in the search for the correct incantations.