网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

Excel VBA 页面字体设置(中英文字体设置)

时间:2024-10-12 01:42:57

1、首先打开Excel工作表,或新建一个表格。

Excel VBA 页面字体设置(中英文字体设置)

3、在模块中编写如下代码:Sub Selectfont() With ActiveSheet.Cells.Font .Name = "宋体" .Size = 11 End With With ActiveSheet.Cells.Font .Name = "Times New Roman" .Size = 11 End WithEnd Sub运行上面代码,这样我们输入中文就是11号宋体,输入数字或英文就是Times New Roman 字体。

Excel VBA 页面字体设置(中英文字体设置)
© 阿力知识库