Compartir a través de


ChartSheetBase.Location (Método)

Mueve el objeto Microsoft.Office.Tools.Excel.ChartSheetBase a una nueva ubicación.

Espacio de nombres:  Microsoft.Office.Tools.Excel
Ensamblado:  Microsoft.Office.Tools.Excel.v4.0.Utilities (en Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Sintaxis

'Declaración
Public Function Location ( _
    where As XlChartLocation, _
    name As Object _
) As Chart
public Chart Location(
    XlChartLocation where,
    Object name
)

Parámetros

Valor devuelto

Tipo: Microsoft.Office.Interop.Excel.Chart

Ejemplos

El ejemplo de código siguiente utiliza el método Location para mover el objeto Microsoft.Office.Tools.Excel.ChartSheetBase actual a una nueva hoja de cálculo denominada "NewSheet".

Private Sub MoveToNewSheet()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.SetSourceData(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlRowCol.xlColumns)
    Me.ChartType = Excel.XlChartType.xl3DColumn

    Me.Location(Excel.XlChartLocation.xlLocationAsNewSheet, _
        "NewSheet")
End Sub
private void MoveToNewSheet()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlRowCol.xlColumns);
    this.ChartType = Excel.XlChartType.xl3DColumn; 

    this.Location(Excel.XlChartLocation.xlLocationAsNewSheet, 
        "NewSheet");
}

Seguridad de .NET Framework

Vea también

Referencia

ChartSheetBase Clase

Microsoft.Office.Tools.Excel (Espacio de nombres)