tyoshikawa1106のブログ

- Force.com Developer Blog -

VBA:プロパティの一括指定

一つのプロパティに対して一括で指定する場合、次の方法で行います。

Sub test()
    With Worksheets("Sheet1")
        .Activate
        .Range("A1").Value = "HelloWorld"
        .Range("A1").RowHeight = 60
        .Range("A1").ColumnWidth = 20
    End With
End Sub