Click to Rate and Give Feedback
MSDN
MSDN Library

  Switch on low bandwidth view
Excel Primary Interop Assembly Reference
_Application.ActiveCell Property
Returns a Range object that represents the active cell in the active window (the window on top) or in the specified window. If the window isn't displaying a worksheet, this property fails.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

Visual Basic
Dim _Application1 As _Application

Dim returnValue As Range
returnValue = _Application1.ActiveCell
Visual Basic
ReadOnly Property ActiveCell() As Range
C#
Range ActiveCell {get;}
C++
property Range^ ActiveCell{
	Range^ get();
}
J#
public Range get_ActiveCell();
JScript
function get ActiveCell() : Range;

Be careful to distinguish between the active cell and the selection. The active cell is a single cell inside the current selection. The selection may contain more than one cell, but only one is the active cell.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker