vba 如何有效地增加整个 Excel 工作表上每个单元格的字体大小?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14463947/
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
how can I increase font size of each cell on entire excel sheet effeciently?
提问by sagar
how can I increase font size of each cell on entire excel sheet effeciently ? When I use foreach loop excel goes non responsive.
如何有效地增加整个 Excel 工作表上每个单元格的字体大小?当我使用 foreach 循环时,excel 没有响应。
回答by John Bustos
Try this Sub:
试试这个子:
Sub IncreaseFontSize()
ActiveSheet.Cells.Font.Size = 14
End Sub
... Just change the size to whatever you want.
...只需将大小更改为您想要的任何大小。
回答by Peter Albert
No need for VBA (unless of course part of another macro):
不需要 VBA(当然除非是另一个宏的一部分):
Simply select all worksheets (activate the first worksheet and then press Shiftand select the last worksheet), then select all cells (Ctrl-A) and enter the desired font size in the Home
tab's font size drop down or use the `Increase Font Size′ button.
只需选择所有工作表(激活第一个工作表,然后按下Shift并选择最后一个工作表),然后选择所有单元格 ( Ctrl- A) 并在Home
选项卡的字体大小下拉列表中输入所需的字体大小或使用“增加字体大小”按钮。