Table of contents
Collapse the table of content
Expand the table of content

Application.SetActiveCell Method (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Sets the value of the active cell.


expression. SetActiveCell( ** Value, ** Create )

expression A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
ValueRequiredStringThe new value for the active cell.
CreateOptionalBooleanTrue 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
© 2018 Microsoft