1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Multiple Excel Sessions

Discussion in 'Business Applications' started by spacefamily, Dec 12, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. spacefamily

    spacefamily Thread Starter

    Joined:
    Dec 12, 2011
    Messages:
    1
    How do I open multiple excel sessions? Opening multiple windows within one excel session/window is not productive in working/comparing multiple spreadsheets.
     
  2. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,608
    First Name:
    Hans
    Hi, welcome to the forum.

    I tried a batch file but it uses the same Excel session
    I tried the vbs script below and it does the job:

    Code:
    Public GetAbsolutePath, GetTheParent
    Dim objExcel, f, objFso, fname
    Set objFso = CreateObject("Scripting.FileSystemObject") 
    Set objExcel = CreateObject("Excel.Application")
    GetAbsolutePath = objfso.GetAbsolutePathName(Wscript.ScriptName)
    GetTheParent = Objfso.GetParentFolderName(WScript.ScriptFullName) 'Returns the parentfolder of the Path/File specified
    
    fname = Array("[COLOR="Red"]<filename here incl extension>[/COLOR]","[COLOR="Red"]<filename here incl extension>[/COLOR]")
    For f = LBound(fname) To UBound(fname)
    	If objFso.FileExists(GetTheParent & "\" & fname(f)) Then
    		MsgBox fname(f),,f
    		objExcel.Workbooks.Open(GetTheParent & "\" &fname(f))
    		objExcel.Visible = True
    	End If
    Next 
    Set objExcel=Nothing
    Set objFso=Nothing 
    WScript.quit
    
    Copy the code to Notepad and choose save as and type the name in between quotes "<the name you give it>.vbs" so that the .txt extension won't be used.
    Place this one in the saem folder as you Execl files.

    If the files are in different folders then you will have to include the fullpaath instead of GetTheParent

    This will open all the Execl files in a new Excel session

    I hope I've been able to explain it a bit.
     
  3. Noyb

    Noyb Trusted Advisor Spam Fighter

    Joined:
    May 25, 2005
    Messages:
    21,003
    First Name:
    Jay
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,608
    First Name:
    Hans
    Nice one, but then it will do it all the time.

    BTW, Office 2010 is Office14 so then you have them all :)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1031002

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice