Consulting

Results 1 to 9 of 9

Thread: Solved: Preventing Excel from opening in IE

  1. #1

    Question Solved: Preventing Excel from opening in IE

    Hi,

    Is there anyway to build something into the Open command of an Excel workbook to force it to open in Excel rather than in Internet Explorer? (as my workbook is downloaded off the net)

    I have seen solutions like this> http://www.computerhope.com/issues/ch000462.htm but they require you to change your settings on your computer rather than the workbook itself. I have over 300 users and this would take forever this way!!!

    Thanks

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Hi Tom,
    May I ask why this is needed? How a file opens is a user setting. Overriding user settings is considered is generally considered "poor behavior". Are you sure this is the best approach?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Basically I need to make this change because, when my workbook is opened in IE lots of the VB code doesnt behave as it does when functioning in the proper Excel applicaiton.....

  4. #4
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    What code is not behaving as it should?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  5. #5
    print previews, printing, saving........etc

    all code that I have written works fine in excel, but buggers up in IE

  6. #6
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    You could just give them a button in the workbook that reopens the file in Excel:
    [vba]Public Sub LaunchInExcel()
    Dim strPath As String
    Dim xlApp As Excel.Application
    strPath = Environ$("TEMP") & "\" & GetGUID & ".xls"
    ThisWorkbook.SaveCopyAs strPath
    Set xlApp = New Excel.Application
    xlApp.Workbooks.Open strPath
    xlApp.Visible = True
    End Sub

    Private Function GetGUID() As String
    GetGUID = Mid$(CreateObject("Scriptlet.TypeLib").GUID, 2&, 36&)
    End Function
    [/vba]
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  7. #7
    Great Thanks

  8. #8
    Why do u need this bit?

    [VBA]Private Function GetGUID() As String
    GetGUID = Mid$(CreateObject("Scriptlet.TypeLib").GUID, 2&, 36&)
    End Function [/VBA]

  9. #9
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Just a way to get a temporary file name that I know won't already be in use
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

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