vba 最大化打开 Excel 电子表格

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12909200/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 14:12:23  来源:igfitidea点击:

Opening Excel spreadsheets maximized

excel-vbaexcel-2010vbaexcel

提问by C.F.

for a better user experience, I would like to make a spreadsheet downloaded from the web maximized when it is opened through the user's desktop MS Excel 2010 program.

为了更好的用户体验,我想使从网络下载的电子表格在通过用户桌面 MS Excel 2010 程序打开时最大化。

Can this be achieved through preference configuration or is there Macro involved?

这可以通过首选项配置来实现还是涉及宏?

Thanks! Che

谢谢!车

回答by Jamie Bull

This is a simple macro to do what you ask. You need to put it in the workbook module.

这是一个简单的宏来完成你的要求。您需要将其放在工作簿模块中。

Private Sub Workbook_Open()
    Application.WindowState = xlMaximized 'maximize Excel
    ActiveWindow.WindowState = xlMaximized 'maximize the workbook in Excel
End Sub  

回答by halley

First, excuse me if I make spelling or grammar mistakes because I well know the French language, I am a Lebanese. Compared to Excel, I had the same problem, Excel (Excel 2010) can not open in Full window (maximized), I make several attempts to locate Excel, I do not manage to solve the problem and I think it issue is caused by a conflict between office and other software.

首先,如果我犯了拼写或语法错误,请原谅我,因为我非常了解法语,我是黎巴嫩人。与 Excel 相比,我遇到了同样的问题,Excel (Excel 2010) 无法在全窗口(最大化)中打开,我多次尝试定位 Excel,但我没有设法解决问题,我认为它是由一个办公软件和其他软件的冲突。

Finally, I solved the problem. How? - I have another hard drive (HDD), I installed Windows on that disk. - I installed Office (Microsoft Office) - I copied this new office Disc 2 - I erased (deleted) Disc 1 - I stuck to the Office Disc 1 The problem is solved.

最后,我解决了这个问题。如何?- 我有另一个硬盘驱动器 (HDD),我在该磁盘上安装了 Windows。- 我安装了Office(Microsoft Office) - 我复制了这个新的Office Disc 2 - 我擦除(删除)了Disc 1 - 我坚持使用Office Disc 1 问题解决了。

Tip: For the next time, when you install Office, it is advisable to keep a copy of this office in another part of the hard drive to replace the original copy if it suffers from a problem.

提示:下次安装Office 时,建议在硬盘的另一部分保留此Office 的副本,以便在出现问题时替换原始副本。



Translated from original:

转载自原文:

Tout d'abord, excusez-moi si je fais des fautes d'orthographe ou de grammaire car je ne connais bien la langue fran?aise, je suis un Libanais. Par rapport à Excel, j'avais le même problème, Excel (Excel 2010) ne peut s'ouvrir en plein fenêtre (maximized), je fais plusieurs essais pour repérer Excel, je ne réussi pas à résoudre le problème et je crois que ce problème résulte d'un conflit entre office et un autre logiciel.

Tout d'abord,借口-moi si je fais des fautes d'orthographe ou de grammaire car je ne connais bien la langue fran?aise,je suis un Libanais。Par rapport à Excel, j'avais le meme problème, Excel (Excel 2010) ne peut s'ouvrir en plein fenêtre (maximized), je fais plusieurs essais pour repérer Excel, je ne réussi pas à résoudre etquele problème résulte d'un conflit entre office et un autre logiciel。

Finalement, j'ai résolu le problème. Comment? - J'ai un autre disque dur (HDD), j'ai installé Windows sur ce disque. - J'ai installé Office (Microsoft office) - J'ai copié ce nouvel office du disque 2 - J'ai effacé (supprimé) du disque 1 - J'ai collé Office au disque 1 Le problème est résolu.

结局,解决问题。评论?- J'ai un autre disque dur (HDD), j'ai installé Windows sur ce disque。- J'ai installé Office (Microsoft office) - J'ai copié ce nouvel office du disque 2 - J'ai effacé (supprimé) du disque 1 - J'ai collé Office au disque 1 Le problème est résolu。

Conseil: Pour les prochaines fois, lorsqu'on installe office, il est conseillé de conserver un copie de cet office sur une autre partie du disque dur pour remplacer la copie originale si elle est atteinte d'un problème.

Conseil:Pour les prochaines fois, lorsqu'on installe office, il est conseillé de converter un copie de cet office sur une autre partie du disque dur pour remplacer la copie originale si elle est atteinte d'un problème。

回答by firewiki

  1. open excel from start menu
  2. when excel is launched, maximized the window. At the time , the excel without any document opened.
  3. drag a document with extension .xls into excel
  4. close the excel
  1. 从开始菜单打开excel
  2. 当 excel 启动时,最大化窗口。当时,没有任何文件的excel打开。
  3. 将扩展名为 .xls 的文档拖入 Excel
  4. 关闭excel

Now, open any document from the explorer, you would see excel speadsheets maximized

现在,从资源管理器中打开任何文档,您会看到 excel 电子表格最大化