数式バーの設定(DisplayFormulaBar, FormulaBarHeight)
2016/01/12
数式バーの設定
数式バーの表示・非表示の設定を行うには、DisplayFormulaBar プロパティを使用します。設定にはブール型(Boolean)の値を使用します。
また、数式バーの高さを設定するには、FormulaBarHeight プロパティを使用します。設定は、長整数型(Long)の値を使用し、数式バーの高さを行数で指定します。
数式バー内の数式や文字を非表示にするには、数式を非表示にする(FormulaHidden プロパティ)を参照してください。
DisplayFormulaBar プロパティ
<取得>
object.DisplayFormulaBar
<設定>
object.DisplayFormulaBar = boolean
引数・戻り値
- object ・・・ 対象となる Application オブジェクトを指定します。
- boolean ・・・ True を指定すると数式バーを表示、False を指定すると数式バーを非表示にします。
FormulaBarHeight プロパティ
<取得>
object.FormulaBarHeight
<設定>
object.FormulaBarHeight = long
引数・戻り値
- object ・・・ 対象となる Application オブジェクトを指定します。
- long ・・・ 数式バーの高さを行数を長整数型(Long)の値で指定します。
FormulaBarHeight の指定された値が表示可能なウィンドウ領域より大きい場合、数式バーはウィンドウの高さと同じになるようサイズ変更されます。
Excel 2007 から数式バーの高さを変更できるようになったので、FormulaBarHeight プロパティを使用できるのは、Excel 2007 以降のバージョンのみです。
DisplayFormulaBar 、FormulaBarHeight 使用例
サンプルVBAソース 1
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Sub Sample01_DisplayFormulaBar() '数式バーを非表示 Application.DisplayFormulaBar = False End Sub Sub Sample02_DisplayFormulaBar() '数式バーを表示 Application.DisplayFormulaBar = True End Sub |
実行結果
Sub Sample01_DisplayFormulaBar() を実行(数式バーを非表示)
Sub Sample02_DisplayFormulaBar() を実行(数式バーを表示)
サンプルVBAソース 2
|
1 2 3 4 5 6 7 8 |
Sub Sample_FormulaBarHeight() '数式バーの高さを5行に設定 Application.FormulaBarHeight = 5 End Sub |
実行結果
関連記事
-
-
印刷の先頭のページ番号を設定(PageSetup.FirstPageNumber プロパティ)
PageSetup.FirstPageNumber プロパティ PageSetu …
-
-
ワークシートの数を数える(Count プロパティ)
Count プロパティ 指定したWorksheets コレクションやSheets …
-
-
ブックの表示・非表示(Visible プロパティ)
ブック表示・非表示(Visible プロパティ) ブック(ウィンドウ)が表示され …
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
印刷の倍率(拡大/縮小)(PageSetup.Zoom プロパティ)
PageSetup.Zoom プロパティ PageSetup.Zoom プロパテ …
-
-
印刷設定(ヘッダーに画像を指定)LeftHeaderPicture, CenterHeaderPicture, RightHeaderPicture
ヘッダーに画像を表示するには LeftHeaderPicture プロパティ、C …
-
-
印刷設定(偶数ページのヘッダー・フッターを設定)OddAndEvenPagesHeaderFooter, EvenPage
偶数ページに別のヘッダーおよびフッターを設定 偶数ページのヘッダーおよびフッター …
-
-
ブックのパスを取得(FullName プロパティ,Path プロパティ)
FullName プロパティ・Path プロパティ ブックのパス(保存場所)を調 …
-
-
別のブックのマクロを実行(Run メソッド)
別のブックのマクロを実行 別のブックのマクロを実行するには、Run メソッド を …
-
-
アクティブシートを参照する(ActiveSheet プロパティ)
アクティブなワークシートを参照する ActiveSheet プロパティを使用する …


