VBA 定数の宣言 #--EXCEL VBA 2025年04月29日 1.文法Const を利用して、宣言します。2.サンプルSub Sub1() Const x As Integer = 10 Debug.Print (x)End Sub3.実行結果10が表示されます。 PR