在这里,我为想象力添加了几个属性,希望这能有所帮助- Sub TestFormatACell()
- Dim aCell As Range, bCell As Range
- Set aCell = ActiveSheet.Range("A1")
- Set bCell = Worksheets(3).Cells(1, 2)
- aCell.Select
- With ActiveCell
- .Font.Bold = True
- .Font.Italic = True
- .Font.Color = RGB(255, 0, 0)
- .NumberFormat = "0.0000000"
- End With
- bCell.Select
- With ActiveCell
- .VerticalAlignment = xlVAlignCenter
- .HorizontalAlignment = xlLeft
- .Font.Bold = False
- .Font.Italic = False
- .Font.Color = RGB(0, 255, 0)
- .NumberFormat = "$#,##0.00"
- End With
- End Sub
~&039;J#039~ |