Dialogsコレクション(組み込みダイアログ)の一覧
VBAでも、Excelの全ての組み込みダイアログを使用する事が可能です。
| 値 | 定数 | 表示されるダイアログ |
| 1 | xlDialogOpen | ファイルを開く |
| 2 | xlDialogOpenLinks | リンク元を開く |
| 5 | xlDialogSaveAs | 名前を付けて保存 |
| 6 | xlDialogFileDelete | ファイルの削除 |
| 7 | xlDialogPageSetup | ページ設定 (ページ) |
| 8 | xlDialogPrint | 印刷 |
| 9 | xlDialogPrinterSetup | プリンタの設定 |
| 12 | xlDialogArrangeAll | ウィンドウの整列 |
| 13 | xlDialogWindowSize | ウィンドウ サイズ |
| 14 | xlDialogWindowMove | ウィンドウの移動 |
| 17 | xlDialogRun | マクロ |
| 23 | xlDialogSetPrintTitles | 印刷タイトルの設定 |
| 26 | xlDialogFont | フォントの設定 |
| 27 | xlDialogDisplay | 画面設定 |
| 28 | xlDialogProtectDocument | シートの保護 |
| 32 | xlDialogCalculation | 計算方法の設定 |
| 35 | xlDialogExtract | 抽出 |
| 36 | xlDialogDataDelete | データの削除 |
| 39 | xlDialogSort | 並べ替え |
| 40 | xlDialogDataSeries | 連続データ |
| 41 | xlDialogTable | テーブル |
| 42 | xlDialogFormatNumber | セルの書式設定 (表示形式) |
| 43 | xlDialogAlignment | セルの書式設定 (配置) |
| 44 | xlDialogStyle | フォントの設定 |
| 45 | xlDialogBorder | セルの書式設定 (罫線) |
| 46 | xlDialogCellProtection | セルの書式設定 (保護) |
| 47 | xlDialogColumnWidth | 列幅 |
| 52 | xlDialogClear | 消去 |
| 53 | xlDialogPasteSpecial | 形式を選択して貼付 |
| 54 | xlDialogEditDelete | 削除 |
| 55 | xlDialogInsert | セルの挿入 |
| 58 | xlDialogPasteNames | 名前の貼付 |
| 61 | xlDialogDefineName | 名前の定義 |
| 62 | xlDialogCreateNames | 名前の作成 |
| 63 | xlDialogFormulaGoto | ジャンプ |
| 64 | xlDialogFormulaFind | 検索 |
| 67 | xlDialogGalleryArea | オートフォーマット (面) |
| 68 | xlDialogGalleryBar | オートフォーマット (横棒) |
| 69 | xlDialogGalleryColumn | オートフォーマット (縦棒) |
| 70 | xlDialogGalleryLine | オートフォーマット (折れ線) |
| 71 | xlDialogGalleryPie | オートフォーマット (円) |
| 72 | xlDialogGalleryScatter | オートフォーマット (散布図) |
| 73 | xlDialogCombination | 複合 |
| 76 | xlDialogGridlines | グラフ オプション (目盛線) |
| 78 | xlDialogAxes | 軸 |
| 80 | xlDialogAttachText | 文字の追加 |
| 84 | xlDialogPatterns | セルの書式設定 (パターン) |
| 85 | xlDialogMainChart | メイン グラフ |
| 86 | xlDialogOverlay | 重ね合わせグラフ |
| 87 | xlDialogScale | 倍率 |
| 88 | xlDialogFormatLegend | 凡例の書式設定 |
| 89 | xlDialogFormatText | 文字書式 |
| 91 | xlDialogParse | 区切り位置 |
| 94 | xlDialogUnhide | ウィンドウの再表示 |
| 95 | xlDialogWorkspace | 作業状態設定 |
| 103 | xlDialogActivate | ウィンドウの選択 |
| 108 | xlDialogCopyPicture | 図のコピー |
| 110 | xlDialogDeleteName | 名前の定義 |
| 111 | xlDialogDeleteFormat | セルの書式設定 (表示形式) |
| 119 | xlDialogNew | 新規作成 (標準) |
| 127 | xlDialogRowHeight | 行の高さ |
| 128 | xlDialogFormatMove | 移動の書式設定 |
| 129 | xlDialogFormatSize | サイズの書式設定 |
| 130 | xlDialogFormulaReplace | 置換 |
| 132 | xlDialogSelectSpecial | 選択オプション |
| 133 | xlDialogApplyNames | 名前の引用 |
| 134 | xlDialogReplaceFont | フォントの設定 |
| 137 | xlDialogSplit | 列の分割、 行の分割 |
| 142 | xlDialogOutline | 設定 |
| 145 | xlDialogSaveWorkbook | 名前を付けて保存 |
| 147 | xlDialogCopyChart | グラフのコピー |
| 150 | xlDialogFormatFont | フォントの設定 |
| 154 | xlDialogNote | コメントの挿入 |
| 159 | xlDialogSetUpdateStatus | 更新状態の設定 |
| 161 | xlDialogColorPalette | オプション (色) |
| 166 | xlDialogChangeLink | リンクの変更 |
| 170 | xlDialogAppMove | 移動(アプリケーション) |
| 171 | xlDialogAppSize | 送信 |
| 185 | xlDialogMainChartType | メイン グラフの種類 |
| 186 | xlDialogOverlayChartType | グラフの種類の重ね合わせ |
| 188 | xlDialogOpenMail | メールを開く |
| 189 | xlDialogSendMail | メッセージ (HTML 形式) |
| 190 | xlDialogStandardFont | フォントの設定 |
| 191 | xlDialogConsolidate | 統合の設定 |
| 192 | xlDialogSortSpecial | 並べ替え |
| 193 | xlDialogGallery3dArea | オートフォーマット (3-D 面) |
| 194 | xlDialogGallery3dColumn | オートフォーマット (3-D 縦棒) |
| 195 | xlDialogGallery3dLine | オートフォーマット (3-D 折れ線) |
| 196 | xlDialogGallery3dPie | オートフォーマット (3-D 円) |
| 197 | xlDialogView3d | 3D 表示 |
| 198 | xlDialogGoalSeek | ゴール シーク |
| 199 | xlDialogWorkgroup | グループ編集 |
| 200 | xlDialogFillGroup | グループの入力 |
| 201 | xlDialogUpdateLink | リンクの更新 |
| 202 | xlDialogPromote | グループの解除 |
| 203 | xlDialogDemote | グループ化 |
| 204 | xlDialogShowDetail | 詳細データの表示 |
| 207 | xlDialogObjectProperties | オブジェクトのプロパティ |
| 208 | xlDialogSaveNewObject | 「新しいオブジェクトの保存 |
| 212 | xlDialogApplyStyle | スタイル |
| 213 | xlDialogAssignToObject | オブジェクトへの登録 |
| 214 | xlDialogObjectProtection | オブジェクトの保護 |
| 217 | xlDialogCreatePublisher | 発行側の作成 |
| 218 | xlDialogSubscribeTo | 引用 |
| 220 | xlDialogShowToolbar | ユーザー設定 (オプション) |
| 222 | xlDialogPrintPreview | 印刷プレビュー |
| 223 | xlDialogEditColor | 色の編集 |
| 225 | xlDialogFormatMain | メイングラフ/重ね合わせグラフ |
| 226 | xlDialogFormatOverlay | 重ね合わせグラフの設定 |
| 228 | xlDialogEditSeries | 系列の編集 |
| 229 | xlDialogDefineStyle | スタイル |
| 249 | xlDialogGalleryRadar | オートフォーマット (レーダー) |
| 251 | xlDialogEditionOptions | エディション オプション |
| 256 | xlDialogZoom | ズーム |
| 259 | xlDialogInsertObject | オブジェクトの挿入 (新規作成) |
| 261 | xlDialogSize | サイズ |
| 262 | xlDialogMove | 移動 |
| 269 | xlDialogFormatAuto | オートフォーマット |
| 272 | xlDialogGallery3dBar | オートフォーマット (横棒) |
| 273 | xlDialogGallery3dSurface | オートフォーマット (等高線) |
| 276 | xlDialogCustomizeToolbar | ユーザー設定 (オプション) |
| 281 | xlDialogWorkbookAdd | シートの移動またはコピー |
| 282 | xlDialogWorkbookMove | シートの移動またはコピー |
| 283 | xlDialogWorkbookCopy | シートの移動またはコピー |
| 284 | xlDialogWorkbookOptions | シート名の変更 |
| 285 | xlDialogSaveWorkspace | 作業状態の保存 |
| 288 | xlDialogChartWizard | グラフ ウィザード |
| 293 | xlDialogAssignToTool | ツールに割り当て |
| 300 | xlDialogPlacement | 表示位置 |
| 301 | xlDialogFillWorkgroup | ワークグループの入力 |
| 302 | xlDialogWorkbookNew | 挿入 (標準) |
| 305 | xlDialogScenarioCells | シナリオの登録と管理 |
| 307 | xlDialogScenarioAdd | シナリオの追加 |
| 308 | xlDialogScenarioEdit | シナリオの追加 |
| 311 | xlDialogScenarioSummary | シナリオの情報 |
| 312 | xlDialogPivotTableWizard | ピボットテーブル/ピボットグラフ ウィザード |
| 313 | xlDialogPivotFieldProperties | ピボット フィールド プロパティ |
| 318 | xlDialogOptionsCalculation | オプション (計算方法) |
| 319 | xlDialogOptionsEdit | オプション (編集) |
| 320 | xlDialogOptionsView | オプション (表示) |
| 321 | xlDialogAddinManager | アドイン |
| 322 | xlDialogMenuEditor | メニュー エディタ |
| 323 | xlDialogAttachToolbars | ブックへのツールバーの登録 |
| 325 | xlDialogOptionsChart | オプション (グラフ) |
| 328 | xlDialogVbaInsertFile | VBA 挿入ファイル |
| 330 | xlDialogVbaProcedureDefinition | VBA 手順定義 |
| 336 | xlDialogRoutingSlip | 回覧先 |
| 339 | xlDialogMailLogon | 回覧先 |
| 342 | xlDialogInsertPicture | 図の挿入 |
| 344 | xlDialogGalleryDoughnut | オートフォーマット (ドーナッツ) |
| 350 | xlDialogChartTrend | グラフ トレンド |
| 354 | xlDialogWorkbookInsert | 挿入 (標準) |
| 355 | xlDialogOptionsTransition | オプション (移行) |
| 356 | xlDialogOptionsGeneral | オプション (全般) |
| 370 | xlDialogFilterAdvanced | フィルタ オプションの設定 |
| 378 | xlDialogMailNextLetter | 次の手紙の送信 |
| 379 | xlDialogDataLabel | データ ラベル |
| 380 | xlDialogInsertTitle | タイトル/軸ラベルの挿入 |
| 381 | xlDialogFontProperties | セルの書式設定 (フォント) |
| 382 | xlDialogMacroOptions | マクロ オプション |
| 384 | xlDialogWorkbookUnhide | 再表示 |
| 386 | xlDialogWorkbookName | シート名の変更 |
| 388 | xlDialogGalleryCustom | オートフォーマット (フォーマットの種類) |
| 390 | xlDialogAddChartAutoformat | ユーザー設定のグラフ種類の追加 |
| 392 | xlDialogChartAddData | グラフ追加データ |
| 394 | xlDialogTabOrder | タブ オーダーの設定 |
| 398 | xlDialogSubtotalCreate | 集計の設定 |
| 415 | xlDialogWorkbookTabSplit | ブックのタブ分割 |
| 417 | xlDialogWorkbookProtect | ブックの保護 |
| 420 | xlDialogScrollbarProperties | スクロール バーのプロパティ |
| 421 | xlDialogPivotShowPages | ピボット表示ページ |
| 422 | xlDialogTextToColumns | 区切り位置 |
| 423 | xlDialogFormatCharttype | グラフの種類 |
| 433 | xlDialogPivotFieldGroup | ピボット フィールド グループ |
| 434 | xlDialogPivotFieldUngroup | ピボット フィールド グループ解除 |
| 435 | xlDialogCheckboxProperties | チェック ボックスのプロパティ |
| 436 | xlDialogLabelProperties | ラベルのプロパティ |
| 437 | xlDialogListboxProperties | リスト ボックスのプロパティ |
| 438 | xlDialogEditboxProperties | 編集ボックスのプロパティ |
| 441 | xlDialogOpenText | テキストを開く |
| 445 | xlDialogPushbuttonProperties | プッシュ ボタンのプロパティ |
| 447 | xlDialogFilter | オートフィルタ |
| 450 | xlDialogFunctionWizard | 関数の挿入 |
| 456 | xlDialogSaveCopyAs | コピーを名前を付けて保存 |
| 458 | xlDialogOptionsListsAdd | オプション (ユーザー設定リスト) |
| 460 | xlDialogSeriesAxes | 系列軸 |
| 461 | xlDialogSeriesX | 系列 X |
| 462 | xlDialogSeriesY | データ系列の書式設定 (名前/値) |
| 463 | xlDialogErrorbarX | Errorbar X |
| 464 | xlDialogErrorbarY | Errorbar Y |
| 465 | xlDialogFormatChart | グラフの書式設定 |
| 466 | xlDialogSeriesOrder | 系列の順序 |
| 470 | xlDialogMailEditMailer | メール編集メーラー |
| 472 | xlDialogStandardWidth | 標準の幅 |
| 473 | xlDialogScenarioMerge | シナリオのコピー |
| 474 | xlDialogProperties | プロパティ (ファイルの概要) |
| 474 | xlDialogSummaryInfo | プロパティ (ファイルの概要) |
| 475 | xlDialogFindFile | ファイルを開く |
| 476 | xlDialogActiveCellFont | セルの書式設定 (フォント) |
| 478 | xlDialogVbaMakeAddin | VBA 作成アドイン |
| 481 | xlDialogFileSharing | ブックの共有 (編集) |
| 485 | xlDialogAutoCorrect | オートコレクト (オートコレクト) |
| 493 | xlDialogCustomViews | ユーザー設定のビュー |
| 496 | xlDialogInsertNameLabel | ラベル範囲 |
| 504 | xlDialogSeriesShape | 系列の形状 |
| 505 | xlDialogChartOptionsDataLabels | グラフ オプション データ ラベル |
| 506 | xlDialogChartOptionsDataTable | グラフ オプション データ テーブル |
| 509 | xlDialogSetBackgroundPicture | シートの背景 |
| 525 | xlDialogDataValidation | データの入力規則 (設定) |
| 526 | xlDialogChartType | グラフの種類 |
| 527 | xlDialogChartLocation | グラフの場所 |
| 530 | xlDialogExternalDataProperties | 外部データのプロパティ |
| 540 | xlDialogChartSourceData | グラフの元データ |
| 557 | xlDialogSeriesOptions | 系列オプション |
| 567 | xlDialogPivotTableOptions | ピボットテーブル オプション |
| 568 | xlDialogPivotSolveOrder | ピボット解決順序 |
| 570 | xlDialogPivotCalculatedField | ピボット集計フィールド |
| 572 | xlDialogPivotCalculatedItem | ピボット集計アイテム |
| 583 | xlDialogConditionalFormatting | 条件付き書式の設定 |
| 596 | xlDialogInsertHyperlink | ハイパーリンクの挿入 |
| 620 | xlDialogProtectSharing | 共有ブックの保護 |
| 647 | xlDialogOptionsME | オプション (インターナショナル) |
| 653 | xlDialogPublishAsWebPage | Web ページとして発行 |
| 656 | xlDialogPhonetic | ふりがなの設定 (ふりがな) |
| 666 | xlDialogImportTextFile | テキスト ファイルのインポート |
| 667 | xlDialogNewWebQuery | 新しい Web クエリ |
| 683 | xlDialogWebOptionsGeneral | Web オプション (全般) |
| 684 | xlDialogWebOptionsFiles | Web オプション (ファイル) |
| 685 | xlDialogWebOptionsPictures | Web オプション (図) |
| 686 | xlDialogWebOptionsEncoding | Web オプション (エンコード) |
| 687 | xlDialogWebOptionsFonts | Web オプション (フォント) |
| 689 | xlDialogPivotClientServerSet | ピボット クライアント サーバー セット |
| 709 | xlDialogEvaluateFormula | 数式の検証 |
| 723 | xlDialogDataLabelMultiple | データ ラベル複数 |
| 724 | xlDialogChartOptionsDataLabelMultiple | グラフ オプション データ ラベル複数 |
| 731 | xlDialogSearch | 通常のファイル検索 |
| 732 | xlDialogErrorChecking | エラー チェック |
| 754 | xlDialogPropertyFields | プロパティ フィールド |
| 773 | xlDialogWebOptionsBrowsers | Web オプション (ブラウザ) |
| 796 | xlDialogCreateList | リストの作成 |
| 832 | xlDialogPermission | アクセス許可 |
| 834 | xlDialogMyPermission | アクセス許可 |
| 862 | xlDialogDocumentInspector | ドキュメント検査 |
サンプルプログラム
下記のような形でコードを作成します。
Public Sub sample()
'■印刷ダイアログを表示
Application.Dialogs(xlDialogPrint).Show '定数の場合
Application.Dialogs(8).Show '値 の場合
'■印刷ダイアログを表示→印刷ボタンを押したTrue/押していないFalse
If Application.Dialogs(xlDialogPrint).Show = True Then
Debug.Print "印刷した"
Else
Debug.Print "印刷キャンセルした"
End If
End Sub
コメント