Cant add a reference to the specified file
Now here's the strange thing. Exit Word. Very bizarre! I reinstalled MS Office, cleaned the registry of all references to Foo, but no joy. It turned out that the problem was somewhere inside my XP profile.
When I logged in as another user, everything worked. Echilon 9, 28 28 gold badges silver badges bronze badges. Mark Harrison Mark Harrison 51 2 2 bronze badges. Both my systems are running Windows 7 x One has Excel , the other Excel Loophole Loophole 2 2 silver badges 5 5 bronze badges. Just to add to my post above - I was getting both the reported "cannot add a reference" error, and if I used CreateObject without adding a reference a "License not available" error.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Jul 22nd, , PM 2. Jul 22nd, , PM 3. That means you cannot add a Reference, but instead need to declare each of the functions you want to use, which would be something like this: Code:. Jul 22nd, , PM 4. Re: Can't add a reference to the specified file Thanks Si, you rock as usual. Jul 22nd, , PM 5. Re: Can't add a reference to the specified file If getDeviceID doesn't take any parameters and doesn't return anything, that is correct - and to call it you can use either of these: Code:.
Jul 22nd, , PM 6. Jul 22nd, , PM 7. Re: Can't add a reference to the specified file It could be that the function does not exist, but it is more likely that the parameters or return type are not correct. Based on experience I would guess that it is a Long, in which case the code would be like this: Code:. Jul 23rd, , PM 8. Re: Can't add a reference to the specified file Thanks to all those who commented, but I was successfully able to do this with the following code: Code:.
All times are GMT The time now is AM.
0コメント