title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.SetActiveCell method (Project) |
vbapj.chm6 |
|
project-server |
|
fcc225b7-98a6-7b3d-ff3b-22392f09920b |
06/08/2017 |
medium |
Sets the value of the active cell.
expression. SetActiveCell
( _Value_
, _Create_
)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Value | Required | String | The new value for the active cell. |
Create | Optional | Boolean | True if a new assignment, resource, or task should be created when setting the value of the active cell, if one doesn't already exist. The default value is True. |
Boolean
The SetActiveCell method is not available when the Calendar, Network Diagram, or Resource Graph is the active view.
The following example enters the specified text in the active cell. It assumes the active cell accepts string input.
Sub AddCommentToTable()
Dim M As String
M = InputBox$("Enter your comment: ")
SetActiveCell M, False
End Sub
[!includeSupport and feedback]