![](https://excel-vba.work/wp-content/themes/cocoon-master/images/b-woman.png)
VBAで
・月の英語表記を取得
できます!
![](https://excel-vba.work/wp-content/themes/cocoon-master/images/b-woman.png)
英語表記は
・省略された表記(Apr等)
・省略されていない表記(April等)
を取得できます!
![](https://excel-vba.work/wp-content/themes/cocoon-master/images/b-woman.png)
VBA関数である
・Format関数
により取得できます!
VBAコード
ここでは例として
・本日日付(4月)の
・月の英語表記(省略された表記)
・月の英語表記(省略されていない表記)
を取得します。
Sub sample()
'月の英語表記(省略された表記)を取得
MsgBox Format(Date, "mmm")
'月の英語表記(省略されていない表記)を取得
MsgBox Format(Date, "mmmm")
End Sub
実行結果
本日日付から
・月の英語表記(省略された表記)
・月の英語表記(省略されていない表記)
を取得できました。
![月の英語表記(省略された表記)](https://excel-vba.work/wp-content/uploads/2022/04/vba_get_month_english_001.png)
![月の英語表記(省略されていない表記)](https://excel-vba.work/wp-content/uploads/2022/04/vba_get_month_english_002.png)
参考①
月の英語表記は「WorksheetFunction」オブジェクトの「Text」メソッドでも取得できます。
※「WorksheetFunction」オブジェクトの「Text」メソッドは、ワークシート関数の「Text関数」です。
ただ「Format関数」の方がシンプルと思うため、「Format関数」の使用をオススメします。
Sub sample()
'月の英語表記(省略された表記)を取得
MsgBox WorksheetFunction.Text(Date, "mmm")
'月の英語表記(省略されていない表記)を取得
MsgBox WorksheetFunction.Text(Date, "mmmm")
End Sub
参考②
曜日の英語表記も取得できます。
詳細は以下の記事をご確認ください。
参考③
上記で使用した以下の詳細は、公式サイトをご確認ください。
●Date関数
●Format関数