+ Reply to Thread
Results 1 to 5 of 5

Tool > References within macro code

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Tool > References within macro code

    I would like to be able to have the macro code "check" the box in VBA Tools>References so that the user does not have to do this. This would make the macro more portable. This would come in handy for both VLOOKUP and SOLVER macros. Any suggestions?

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Tool > References within macro code

    Perhaps any of these links could be of help?

    http://visualbasic.ittoolbox.com/gro...talled-3650039


    http://stackoverflow.com/questions/1...and-referenced

    Alf

  3. #3
    Registered User
    Join Date
    02-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Tool > References within macro code

    Alf,

    Thank you for your response. While these both refer to code to check to see if these are added in (which work, I checked), neither does the "adding-in".

    I am working up a demo for class, and it is possible that the user has not added in Solver. While we can check if it is added in (thank you -- I will add a "check" button to the user interface), the issue remains whether we can add Solver by using VBA in the macro itself. Wouldn't it be cleaner, in terms of making a general interface, not to have to instruct the user to open up the VBA window, find Tools, find References, find and check Solver? Perhaps this is wishful thinking on my part. And perhaps it is my failure to understand why Solver and VLOOKUP, among other things, are not automatically available in VBA.

    Thank you for directing me to the checking code.

    Pam

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Tool > References within macro code

    If you lower the security settings, you could use http://www.ozgrid.com/forum/showthread.php?t=42486

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Tool > References within macro code

    neither does the "adding-in".
    Must say I also had little sucess trying to set a reference to Solver using a macro. The problem I think could be from where to find solver.

    If you are using a 32bits window (XP for instance) and a 32bit offece (office 2003) then the solver.xla file is probably found at
    "C:\Program Files\Microsoft Office\OFFICE11\Library\SOLVER\solver.xla"

    Using Windows 7 32bit and Office 2007 also 32 bit you will find the Solver.xlam (yes name changed to xlam") at
    "C:\Program Files\Microsoft Office\OFFICE12\Library\SOLVER\solver.xlam"

    If your Windows is 64 bit and your office 32 bit solver is found at

    "C:\Program Files(x86)\Microsoft Office\OFFICE12\Library\SOLVER\solver.xlam"

    If your Office 2007 is also 64 bit then it will be

    "C:\Program Files\Microsoft Office\OFFICE12\Library\SOLVER\solver.xlam"


    For Office 2010 depending on 32 or 64 bit (Program Files(x86) or just Program Files) and Office14 but file is still called Solver.xlam

    What the folder is for Office 2013 I don't know and these are only the default instalation folders you may chose your own "specific" instalation folder.

    If you are setting up a demo I think it's better to show how to install / setting a reference to solver.

    And perhaps it is my failure to understand why Solver and VLOOKUP, among other things, are not automatically available in VBA.
    Well you are not the only one , mysel I've also wondered why this is so.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Tool to clean VBA code
    By cachirro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2013, 04:02 PM
  2. Help with the VBA code in the attached Automation Tool
    By Pavithra Jyothish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-25-2013, 04:49 AM
  3. how to select textbox tool via a VB code
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2010, 06:50 PM
  4. [SOLVED] VBA - Tool References - menu freezed
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2006, 10:50 AM
  5. Webservices References Tool 2.0 - Error: No Deserializer found ..
    By Peter S. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2005, 07:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1