数式バーの設定(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 |
実行結果
関連記事
-
-
印刷実行前に総ページ数を取得(ExecuteExcel4Macro メソッド)
印刷の総ページ数を取得(ExecuteExcel4Macro メソッド) Exc …
-
-
印刷:余白を設定 TopMargin,BottomMargin,LeftMargin,RightMargin,HeaderMargin,FooterMargin
余白を設定する 余白を設定する単位は、pt(ポイント:約 0.03528 cm) …
-
-
ブックの変更が保存されているかを確認する(Saved プロパティ)
ブックの変更が保存されているかを確認する(Saved プロパティ) Saved …
-
-
ワークシートにクリップボードの内容を貼り付ける(Paste メソッド)
Paste メソッド 指定したワークシート上にクリップボードのデータを貼り付けま …
-
-
ブックを別名で保存(SaveAs メソッド)
ブックを別名で保存(SaveAs メソッド) ブックの変更を保存したり、新規ブッ …
-
-
アクティブプリンタを変更(ActivePrinter プロパティ)
ActivePrinter プロパティ ActivePrinter プロパティを …
-
-
ワークシートをアクティブにする・選択する(Activate, Select)
Activate メソッド・Select メソッド Activate メソッドは …
-
-
印刷のタイトル行、タイトル列を設定(PrintTitleRows,PrintTitleColumns)
PageSetup.PrintTitleRows プロパティ PageSetup …
-
-
ブック作成時のシート数の取得・設定(SheetsInNewWorkbook プロパティ)
SheetsInNewWorkbook プロパティ Excel で新規ブックに自 …
-
-
印刷する用紙の向きを設定(PageSetup.Orientation プロパティ)
PageSetup.Orientation プロパティ PageSetup.Or …


