+ Reply to Thread
Results 1 to 15 of 15

Keep Scripting Runtime References Enabled Always In My Excel VBA

  1. #1
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Keep Scripting Runtime References Enabled Always In My Excel VBA

    Once I close and reopen excel the reference to Microsoft Scripting Runtime getting disabled from excel vba.

    Any suggestion about how to keep it enabled?
    Attached Images Attached Images
    Last edited by :) Sixthsense :); 01-12-2015 at 05:01 AM.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,260

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    References are workbook specific. If you really want it set for all workbooks (which seems odd to me), you would need to create a book.xltm template and use that.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Hi Rory,

    Thanks for the solution

    Is it possible to establish the reference in the xlStartup file so that it can be made available in all excel workbook? I tried to do this and see how it works but I don't see any excel file in xlStart and startup folder. Both are empty...

    Quote Originally Posted by romperstomper View Post
    you would need to create a book.xltm template and use that.
    As per your suggestion I have to use that template file (ALONE) whenever I am in need of using Scripting.Dictionary reference made available to use? Rather than using any workbook without establishing the connection manually...?

    Please let me know if there is any solution to make it readily available in all excel workbook I create/open

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA


    Hi,

    I prefer to use late binding but when I really need early binding, I start from a template workbook …

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Hi Marc L,

    Thanks for suggesting Late Binding method, but while writing code I would like to use Early Binding method and when I release the code for OP's I will convert it to late binding.

    But I want to keep the references established in all workbooks instead of manually building the references. Even microsoft doesn't kept a search field to quicky pick the desired reference. Scrolling down to the reference is a hectic one for me..

    Any other suggestions?

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,260

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Why do you want to add the reference to existing workbooks since they presumably don't already require it?

    BTW, if you add the reference to your Personal macro workbook, that reference should remain near the top of the references list even when you have another workbook active, so you don't have to go looking for it.

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Quote Originally Posted by romperstomper View Post
    Why do you want to add the reference to existing workbooks since they presumably don't already require it?
    Mostly, I download the OP's file and write VBA code and I would like to use early binding for (Intellisense / auto-completion) accessing the dictionay propery/methods which will help me in writing the code with lesser time.


    Quote Originally Posted by romperstomper View Post
    BTW, if you add the reference to your Personal macro workbook, that reference should remain near the top of the references list even when you have another workbook active, so you don't have to go looking for it.
    Wow!!! That is a nice tip and I created a record macro to get the Personal.xls and turned on the References. As you said its showing in top in fresh workbooks for easy access.

    Still looking to make it enabled in all workbooks....

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

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    If it's only for the Dictionary object, wouldn't it be easier to just learn them? - there's only about half a dozen

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA


    And Dictionary object is in VBA inner help …

    ___________________________________
    Je suis Charlie

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Hi Kyle123,

    I know it is very less in Dictionary (i.e.) The Dictionary class has four properties and six methods only so it is not a big deal.

    But I am becoming very lazy nowadays or I don't want to waste my time in typing the properties/methods of the objects. I would like to auto load it to save my code writing time also I need not to add/keep the unnecesary junks (Methods/Properties) in my mind when it is readily available in the system itself

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,260

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Assuming you have trusted access to the VBA project set in your Trust Center settings, you could use:
    Please Login or Register  to view this content.
    but you have to run it per workbook.

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

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Or run it on the application's workbook_open event

  13. #13
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Hi,

    Or you can use the notorious sendkeys() :

    Please Login or Register  to view this content.
    Run the code in VBA window, not in spreadsheet window. The code itself can be stored in Personal.xl* for later use.

    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Quote Originally Posted by romperstomper View Post
    Assuming you have trusted access to the VBA project set in your Trust Center settings, you could use:
    Wow!!! You made it handy!!!!

    Surely, it's going to save lot of my time....

    I am going to mark it sovled happily

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Keep Scripting Runtime References Enabled Always In My Excel VBA

    Quote Originally Posted by Kyle123 View Post
    Or run it on the application's workbook_open event
    Thanks for the suggestion

    Hitting Alt+F8 and enter is not a big deal for me since I am a lightening speed keyboard user

+ 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. [SOLVED] Microsoft Scripting Runtime, Enable with a line of code.
    By mortphil in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2014, 10:18 AM
  2. Missing references - Unable to remove and get runtime error 32809 and
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2014, 08:33 AM
  3. Replies: 3
    Last Post: 04-16-2013, 01:03 AM
  4. Excel 2007 : Scripting in Excel
    By KMB5 in forum Excel General
    Replies: 1
    Last Post: 10-27-2010, 04:07 AM
  5. List files in a folder with Microsoft Scripting Runtime using VBA in Microsoft Ex
    By Suej68 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2010, 05:47 PM

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