Application.SetActiveCell method (Project)

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.

Return value



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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.