Results 1 to 14 of 14
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Startup with Shift Key (2000/SR-3)

    I've started Excel without add-ins by using the Shift key. However, I get a number of prompts that Excel "cannot open the -----add-in for editing". My solution has been to rapidly press the spacebar. Is there a way to start Excel without add-ins by double-clicking a file?

    Alternatively, since I rarely use the features of all the add-ins, is there a quick way to load them only when I need them?
    Thanks in advance,

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    As an experienced Word user, you will know how to set up VBA code to run off a custom icon on your toolbar. You can toggle the loading of Add-Ins through the following VBA code:<pre>Sub LoadAddIn()
    If AddIns("[Phil's Special]").Installed = False Then
    AddIns("[Phil's Special]").Installed = True
    Else: AddIns("[Phil's Special]").Installed = False
    End If
    End Sub</pre>

    HTH
    Gre

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Thanks for this. I can run a VBA code from a toolbar button, but I'm not experienced with the actual code. With multiple add-ins, how would I add the second & subsequent add-ins? Would it be:<pre> If AddIns("FirstAdd-in").Installed = False
    AddIns("SecondAdd-in").Installed = False
    AddIns("ThirdAdd-in").Installed = False Then
    AddIns("FirstAdd-in").Installed = True
    AddIns("SecondAdd-in").Installed = True
    AddIns("ThirdAdd-in").Installed = True
    Else: AddIns("FirstAdd-in").Installed = False
    AddIns("SecondAdd-in").Installed = False
    AddIns("ThirdAdd-in").Installed = False
    End If
    End Sub</pre>


    Thanks again,

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    There may be more elegant ways to do this, but try something like:<pre>Sub LoadAddIns()
    Constant conAddIns as Long = 2 'remember we are counting from zero
    Dim strAddInName(conAddIns) As String
    Dim i As Long
    strAddInName(0) = "Prosecution"
    strAddInName(1) = "Defence"
    strAddInName(2) = "Leisure"

    For i = 0 To conAddins
    Select Case Addins(strAddInName(i)).Installed
    Case False
    Addins(strAddInName(i)).Installed = True
    Case True
    Addins(strAddInName(i)).Installed = False
    Case Else
    End Select
    Next i

    End Sub</pre>

    HTH
    Gre

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Thank you. I'll give it a whirl. I take it that there is no way to avoid the prompts when you hold the shift key & start Excel.

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    I would create a separate icon that uses the /automation switch and first launch XL with that icon before double clicking a file. You might assign a shortcut key to the icon too, like control-shift-E.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Excellent idea! Actually, I already have Excel.exe /automation assigned to Alt+Shift+E, but have been in the habit of using it only when I wanted to create something new, rather than open an existing file. The other habit was to use Windows Find/File or Folder and then double click the file. Sometimes the simplest approach is the most difficult to find.
    Thanks so much.

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Startup with Shift Key (2000/SR-3)

    I'm a bit lost, something like this?

    Sub ToggleAddInList()
    Dim collAddIns As AddIns
    Dim i As Long
    Set collAddIns = Application.AddIns
    For i = 1 To collAddIns.Count
    With collAddIns(i)
    If CBool(InStr("Prosecution, Defence, Leisure", .Name)) Then _
    .Installed = Not (.Installed)
    End With
    Next i
    Set collAddIns = Nothing
    End Sub
    -John ... I float in liquid gardens
    UTC -7DS

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Hi John:
    I got a syntax error with unkamunka's macro, but also got one with yours, so obviously I'm doing something wrong. Here's what I have:<pre>Sub ToggleAddInList()
    Dim collAddIns As AddIns
    Dim i As Long
    Set collAddIns = Application.AddIns
    For i = 1 To collAddIns.Count
    With collAddIns(i)
    If CBool(InStr("Access Links, Analysis Toolpak, Analysis Toolpak - VBA, _
    ASAP Utilities 3.06, Autosave Add-in, Conditional Sum Wizard, _
    Excel 97/2000 Work menu, Internet Assistant VBA, Lookup Wizard, _
    Morefunc (add-in functions), MS Query Add-in, ODBC Add-in , Report Manager, _
    Small Business Financial Manager, Solver Add-in, Template Utilities, _
    Template Wizard with Data Tracking", .Name)) Then _
    .Installed = Not (.Installed)
    End With
    Next i
    Set collAddIns = Nothing
    End Sub</pre>

    I have a feeling it's because I copied the add-in names from the Tools/add-ins box. Any advice?
    Thanks,

  10. #10
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Yoy can't split a string between lines by just inserting an underscore in the string. The underscore just becomes another character in the string. Try this:

    <pre>Sub ToggleAddInList()
    Dim collAddIns As AddIns
    Dim i As Long
    Set collAddIns = Application.AddIns
    For i = 1 To collAddIns.Count
    With collAddIns(i)
    If CBool(InStr("Access Links, Analysis Toolpak, Analysis Toolpak - VBA, " _
    & "ASAP Utilities 3.06, Autosave Add-in, Conditional Sum Wizard, " _
    & "Excel 97/2000 Work menu, Internet Assistant VBA, Lookup Wizard, " _
    & "Morefunc (add-in functions), MS Query Add-in, ODBC Add-in , Report Manager, " _
    & "Small Business Financial Manager, Solver Add-in, Template Utilities, " _
    & "Template Wizard with Data Tracking", .Name)) Then _
    .Installed = Not (.Installed)
    End With
    Next i
    Set collAddIns = Nothing
    End Sub
    </pre>

    Legare Coleman

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Thank you, Legare. Can you answer something else? At least one of the add-ins isn't loading (the ASAP Utilities). How can I find out the exact name that I have to use & how can I tell if an add-in is loaded?
    Thanks again,

  12. #12
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Startup with Shift Key (2000/SR-3)

    I apologize if I misunderstand and am making this too simple:
    You could install the addin with the macro recorder on and will get something (like):

    <pre>AddIns("Template Wizard with Data Tracking").Installed = True</pre>


    which gives you the name. To check whether or not it is installed just look at the property?

    <pre>bInstalled = AddIns("Template Wizard with Data Tracking").Installed</pre>


    Steve

  13. #13
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Phil, that's quite a list of add-ins. If by chance it's -all- your add-ins, you could skip the string comparison to AddIn.Name and instead loop through the entire collection. I wrote that code with the string comparison because I thought that there was a subset of add-ins to be toggled on or off.
    -John ... I float in liquid gardens
    UTC -7DS

  14. #14
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Startup with Shift Key (2000/SR-3)

    Hi Steve & John:
    I apologize for taking so long in getting back & thanking you. <img src=/S/blush.gif border=0 alt=blush width=15 height=15> I got so wrapped up in answering questions over on other boards that I completely dropped this. I will try out all of this soon. For the time being, I just try to remember to start Excel with the automation switch & load add-ins only if I need them. Thanks again for your help.

Posting Permissions

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