[Excel VB] Adding references
I have written a VB application in Excel and it is being distributed to many users. However, many users are getting a 'Can't find project or library' error and after some research I believe the references are the cause.
Ideally, I'd like to add code that inserts references (mainly the Visual Basic for Applications and a handful of Object Libraries)...then distribute the updated version. Is this possible?
Failing that I would direct each user to add the necessary references onto their computer directly. However, I was talking with one user and it seems that the 'References' option is greyed out under 'Tools' in the VB editor. This must mean they have no libraries installed, which is what I was thinking. However, the 'Browse' button is under 'References' (which is grey), so how might I instruct them to go about this method?
Re: [Excel VB] Adding references
Quote:
Ideally, I'd like to add code that inserts references (mainly the Visual Basic for Applications and a handful of Object Libraries)...then distribute the updated version. Is this possible?
Even if you add in references and the user doesn't have the necessary libraries installed then it is of no use...
Quote:
Failing that I would direct each user to add the necessary references onto their computer directly. However, I was talking with one user and it seems that the 'References' option is greyed out under 'Tools' in the VB editor. This must mean they have no libraries installed, which is what I was thinking. However, the 'Browse' button is under 'References' (which is grey), so how might I instruct them to go about this method?
If the libraries are not installed then they cannot use the application that you made...
The other option is using late binding provided the application (for example MS Word) is installed on their system...
Re: [Excel VB] Adding references
Oh ok. Thank you for your reply. I am reading over late binding and I think it's a little over my head. Do you know the procedure for installing libraries on a computer? (i.e. Microsoft Excel 11.0 Object Library)
Re: [Excel VB] Adding references
To do that, you need to install the relevant software - in that example, version 11 of Excel (which I think is Excel 2003).
If you want to work with whichever version is already installed (rather than a particular version), you will need to use Late Binding. I don't know what you've read about it already, but I think you'll find the section of it in my Excel tutorial (link in my signature) is pretty clear.