📜  excel vba更改单元格格式 - VBA代码示例

📅  最后修改于: 2022-03-11 14:51:56.888000             🧑  作者: Mango

代码示例1
'VBA code to change the Number Formatting of a cell range:

[A1].NumberFormat = "@"

'There are hundreds of options for Number Formats. The above sets
'cell A1 to display as Text.

Here are a few other Number Formats:

[A1].NumberFormat = "General"
[A1].NumberFormat = "$#,##0.00"
[A1].NumberFormat = "mm-dd-yyyy"