Spread Windows Forms 12.0 Product Documentation
ModifyCustomName Method (SheetView)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : ModifyCustomName Method
New name of custom name
Modifies the name of a custom name.
Syntax
'Declaration
 
Public Function ModifyCustomName( _
   ByVal currentName As String, _
   ByVal newName As String, _
   ByVal sheetViewScope As Boolean _
) As Boolean
'Usage
 
Dim instance As SheetView
Dim currentName As String
Dim newName As String
Dim sheetViewScope As Boolean
Dim value As Boolean
 
value = instance.ModifyCustomName(currentName, newName, sheetViewScope)
public bool ModifyCustomName( 
   string currentName,
   string newName,
   bool sheetViewScope
)

Parameters

currentName
newName
New name of custom name
sheetViewScope

Return Value

True if name is modified; otherwise, false.
Example
This example uses the ModifyCustomName method.
fpSpread1.ActiveSheet.AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, true, "Comment");
fpSpread1.ActiveSheet.SetFormula(1, 1, "Alpha");
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 10);

private void button1_Click(object sender, EventArgs e)
{
    fpSpread1.Sheets[0].ModifyCustomName("Alpha", "TestAlpha", true);
    listBox1.Items.Add(fpSpread1.ActiveSheet.GetCustomName("TestAlpha", true));
}
fpSpread1.ActiveSheet.AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, True, "Comment")
fpSpread1.ActiveSheet.SetFormula(1, 1, "Alpha")
fpSpread1.ActiveSheet.SetValue(0, 0, 10)
fpSpread1.ActiveSheet.SetValue(1, 0, 10)

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  fpSpread1.Sheets(0).ModifyCustomName("Alpha", "TestAlpha", True)
  ListBox1.Items.Add(fpSpread1.ActiveSheet.GetCustomName("TestAlpha", True))
End Sub
See Also

Reference

SheetView Class
SheetView Members