Table of contents
TOC
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.

Syntax

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

expression A variable that represents an Application object.

Parameters

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

Boolean

Remarks

The SetActiveCell method is not available when the Calendar, Network Diagram, or Resource Graph is the active view.

Example

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