Results 1 to 4 of 4

Thread: [Excel VB] Adding references

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2007
    Posts
    17

    [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?

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: [Excel VB] Adding references

    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...

    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...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2007
    Posts
    17

    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)

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width