【问题标题】:Move worksheet to a new window将工作表移动到新窗口
【发布时间】:2017-06-15 02:18:13
【问题描述】:

我想知道当程序的一个实例已经在运行时打开一个新文档时是否可以避免 MS Excel 2010 的一般行为。基本上发生的是程序在当前环境中打开新的电子表格,作为一个新的工作簿。

我想做的是将在 MS Excel 的新实例中打开新工作簿设置为默认值(或使用键盘快捷键/宏找到一种简单快捷的方法)。

最终目标是让我在一台显示器中保留一个工作簿,并在第二台显示器中移动第二个工作簿(我在工作时使用两台显示器)。

【问题讨论】:

标签: excel excel-2010 multiple-monitors


【解决方案1】:

是的。

如果您想在 VBA 代码中执行此操作,则可以使用以下代码:

Sub OpenInNewInstance()
    Dim xlApp As Application
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Workbooks.Add
    xlApp.Visible = True
End Sub

对于非 VBA 解决方案,您可以打开两个 excel 实例并从每个实例的文件菜单中打开一个文档。

我在 SuperUser 上找到了这种方法,用于在 Excel 的新实例中打开所有工作表

In Excel 2003, go to Tools -> Options -> General tab.

Make sure the option, ‘Ignore other applications’ is checked.

In Excel 2007 & 2010, Click the Office button -> Excel Options -> Advanced.

Under General, check ‘Ignore other applications that use Dynamic Data Exchange’.

https://superuser.com/questions/21602/open-excel-files-in-new-window


或者您可以进行注册表编辑(可能要先备份)

strart - run - regedit:

Left column

HKEY_CLASSES_ROOT/Excel.Sheet.8/shell/Open/commend:

Right column {adding (space)"%1"}

Double Click on (Default) and write - "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /e "%1"

Right Click on Command – choose "rename" and add something to the name  - for example 2 (commend2).

Left column

HKEY_CLASSES_ROOT/Excel.Sheet.8/shell/Open/ddeexec:

Right Click on the folder ddeexec and choose "rename" and add something to the name  - for example 2 (ddeexec2)

Left column

HKEY_CLASSES_ROOT/Excel.Sheet.12/shell/Open/commend:

Right column {adding (space)"%1"}

Double Click on (Default) and write - "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /e "%1"

Right Click on Command – choose "rename" and add something to the name  - for example 2 (commend2).

另外,根据您使用的 Excel 版本,View 菜单中可能有一个选项可以打开一个新窗口。

Source

【讨论】:

  • 您知道其他无需编辑注册表项的方法吗?不幸的是不是我的个人电脑。
  • 当您退出当前 Excel 实例并尝试打开一个新实例时,我已经意识到超级用户的答案会导致错误消息。在超级用户的回答之后的 cmets 上也有报道。真可惜。我将尝试 VBA 脚本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-09
  • 1970-01-01
  • 2013-12-09
  • 1970-01-01
  • 1970-01-01
  • 2021-07-26
  • 1970-01-01
相关资源
最近更新 更多