![]() |
| サイトマップ | |
|
| トップ | オブジェクト | プロパティ | メソッド | 定数 |
ItemType プロパティ |
オブジェクト:ExcelItem, FitItem, GraphItem, MacroItem, NativeWorksheetItem, NotebookItem, ReportItem, SectionItem, TransformItem
NotebookItems コレクションの全てのオブジェクトに共通のプロパティです。そのアイテムやオブジェクトのタイプをあらわす整数値を返します。
| 1 | CT_WORKSHEET | NativeWorksheetItem |
| 2 | CT_GRAPHICPAGE | GraphItem |
| 3 | CT_FOLDER | SectionItem |
| 4 | CT_STATTEST | ReportItem (SigmaStat) |
| 5 | CT_REPORT | ReportItem (SigmaPlot) |
| 6 | CT_FIT | FitItem |
| 7 | CT_NOTEBOOK | NotebookItem |
| 8 | CT_EXCELWORKSHEET | ExcelItem |
| 9 | CT_TRANSFORM | TransformItem |
| 10 | MacroItem |
Dim Items$() ReDim Items(ActiveDocument.NotebookItems.Count) Dim Index Index = 0 While Index<=>=>ActiveDocument.NotebookItems.Count Items$(Index) = CStr(Index) Index = Index + 1 Wend Begin Dialog UserDialog 250,154,"Select the Item Number" ' %GRID:10,7,1,1 OKButton 150,14,90,21 ListBox 10,14,110,126,Items(),.ItemNumber End Dialog Dim dlg As UserDialog Dialog dlg Dim ItemTypeName$ Select Case ActiveDocument.NotebookItems(CLng(dlg.ItemNumber)).ItemType Case 1 ItemTypeName$ = "SigmaPlot Worksheet" Case 2 ItemTypeName$ = "Graphics Page" Case 3 ItemTypeName$ = "Section" Case 4, 5 ItemTypeName$ = "Report" Case 6 ItemTypeName$ = "Equation" Case 7 ItemTypeName$ = "Notebook" Case 8 ItemTypeName$ = "Excel Worksheet" Case 9 ItemTypeName$ = "Transform" Case 10 ItemTypeName$ = "Macro" Case Else ItemTypeName$ = "No Item" End Select MsgBox "The item type is "+ItemTypeName$