Excel – Move Open Document to Separate Window

microsoft excelwindow

Related (but not the same): Open Excel files in new window

If I've got an instance of Excel with multiple documents open in the same window. Is there a way to "tear off" one of the windows in the current running instance of Excel so that it's in an entirely different window?

What does not fit the bill:

  • Arrange all/view side by side/other MDI stuff; I want a separate window which can be maximized separately on another monitor and is managed by the window system differently, etc.
  • Saving/closing it in the running instance and then opening a new instance of Excel and opening the file there (this is what I currently do, but it's a pain)

edit: target Excel version is 2007 and 2010, though anything will do

Best Answer

Interesting idea. I'm reasonably confident that you cannot do this without a custom macro. Being a rainy Sunday...

Sub OpenInNewInstance()
     Dim objXLNewApp As Excel.Application
     Dim doc As String

     doc = ActiveWorkbook.FullName
     ActiveWorkbook.Close True

     Set objXLNewApp = CreateObject("Excel.Application")

     objXLNewApp.Workbooks.Open doc
     objXLNewApp.Visible = True
End Sub

Assuming you're not familiar with VBA, you'd need to:

  1. Copy the code above
  2. With a new Excel workbook opened, open Excel's VBA editor (Alt+F11)
  3. Right-click on VBAProject (Book1) (or whatever it's called in the left menu)
  4. Select Insert > Module
  5. Paste in the code into the main window
  6. Back in Excel, select another workbook to test the code on (it'll save the workbook before it closes it)
  7. Go back to VBA editor, select the module you pasted in and press the play button

I have 3 versions of Excel installed on my machine, and when I run this in Excel 2010, it opens a new instance of Excel 2003.

If this suits your needs, you could package this into an add-in and have it available as a ribbon button. Let me know and I can help out if you're unfamiliar with doing so.

Edit: If this approach works for you, obviously there would be some additional code to add in that would ensure the new instance of Excel is maximized in another window. Let me know.

Related Question