1 out of 1 rated this helpful - Rate this topic

_Application.Goto Method 

Selects any range or Visual Basic procedure in any workbook and activates that workbook if it’s not already active.

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

'Usage
Dim Reference As Object
Dim Scroll As Object
Dim _Application1 As _Application
_Application1.Goto(Reference, Scroll)
void Goto(
	[In, Optional] object Reference, 
	[In, Optional] object Scroll
);
public void Goto(
	/*in*/System.Object Reference, 
	/*in*/System.Object Scroll
);
function Goto(
	 Reference : Object, 
	 Scroll : Object
);

Parameters

Reference

Optional Object. The destination. Can be a Range object, a string that contains a cell reference in R1C1-style notation, or a string that contains a Visual Basic procedure name. If this argument is omitted, the destination is the last range you used the Goto method to select.

Scroll

Optional Object. True to scroll through the window so that the upper-left corner of the range appears in the upper-left corner of the window. False to not scroll through the window. The default is False.

This method differs from the Select method in the following ways:

  • If you specify a range on a sheet that’s not on top, Microsoft Excel will switch to that sheet before selecting. (If you use Select with a range on a sheet that’s not on top, the range will be selected but the sheet won’t be activated).

  • This method has a Scroll argument that lets you scroll through the destination window.

  • When you use the Goto method, the previous selection (before the Goto method runs) is added to the array of previous selections (for more information, see the PreviousSelections property). You can use this feature to quickly jump between as many as four selections.

  • The Select method has a Replace argument; the Goto method doesn’t.


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

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ