Table of contents
TOC
折叠目录
展开目录

Application.ActiveCell 属性 (项目)Application.ActiveCell Property (Project)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取一个Cell对象,该对象代表活动单元格。只读的单元格Gets a Cell object that represents the active cell. Read-only Cell.

语法Syntax

表达式ActiveCellexpression. ActiveCell

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

示例Example

下面的示例会显示分配给所选任务的资源的名称。该示例假定任务视图为活动视图且活动单元格位于任务行中。The following example displays the names of the resources assigned to the selected task. The example assumes a task view is the active view and the active cell is in a task row.

Sub ResourceNames() 

 Dim A As Assignment 

 For Each A In ActiveCell.Task.Assignments 
 MsgBox A.ResourceName 
 Next A 

End Sub
© 2018 Microsoft