順次追加していきます。
セルへ入力
Cells(行番号,列番号)
Cells(1, 1) = 1
セルまたは範囲を選択
Cells(行番号,列番号).select
Range(範囲).select
Cells(1, 1).Select
Range("A1:C3").Select
途中終了
Exit Sub
Exit Sub
メッセージボックスを表示
MsgBox 内容
MsgBox "Hello World"
背景色を変更
(セルまたは範囲).Interior.Color = RGB(赤, 緑, 青)
Cells(1, 1).Interior.Color = RGB(100, 100, 100)
Range("A1:C3").Interior.Color = RGB(100, 100, 100)
フォント色を変更
(セルまたは範囲).Font.Color = RGB(赤, 緑, 青)
Cells(1, 1).Font.Color = RGB(100, 100, 100)
Range("A1:C3").Font.Color = RGB(100, 100, 100)
太字
(セルまたは範囲).Font.Bold = True
Cells(1, 1).Font.Bold = True
Range("A1:C3").Font.Bold = True
斜字
(セルまたは範囲).Font.Italic = True
Cells(1, 1).Font.Italic = True
Range("A1:C3").Font.Italic = True
上書き保存
ActiveWorkbook.Save
ActiveWorkbook.Save
【広告】
『Excelでリバーシを作ろう!! マクロ、VBAを1から学ぶ』
Excelのマクロ(VBA)で「三目並べ」「マインスイーパー」「リバーシ」を作る解説本です!
マクロ、VBAが全くわからない人でも大丈夫! 丁寧な解説と図でしっかり理解しながら楽しくプログラミングを学ぶ事ができます!
値段:300円(Kindle Unlimited対象)
サンプルとして「準備」~「三目並べ」を無料公開しています。
【kindle】
【booth(pdf】