![]() |
| サイトマップ | |
|
トップ | オブジェクト | プロパティ | メソッド | 定数 |
CurrentItem プロパティ |
オブジェクト:Notebook
このプロパティは、現在開いているノートブックアイテムをその種類を問わずオブジェクトとして返します。ActiveDocument プロパティを使って現在アクティブなノートブックを指定する必要があります。
Dim CurrentItem As Object, ItemName As String Set CurrentItem = ActiveDocument.CurrentItem ItemName = InputBox$("Rename Current Item","Notebook Item Name",CurrentItem.Name) If CurrentItem.Name = ItemName Then GoTo Finish Else CurrentItem.Name = ItemName End If Finish:
Dim CurrentItem As Object, TypeOfItem$, ItemCode As Integer ItemCode = ActiveDocument.CurrentItem.ItemType Select Case ItemCode Case 1 TypeOfItem = "SigmaPlot Worksheet" Case 2 TypeOfItem = "Graph Page" Case 3 TypeOfItem = "Section" Case 4 TypeOfItem = "SigmaStat Report" Case 5 TypeOfItem = "SigmaPlot Report" Case 6 TypeOfItem = "Equation" Case 7 TypeOfItem = "Notebook" Case 8 TypeOfItem = "Excel Worksheet" Case 9 TypeOfItem = "Transform" Case 10 TypeOfItem = "Macro" End Select MsgBox "Current Item is a " + TypeOfItem,,"Current Item"