PowerTools SPREAD for Windows Forms 10.0J
ModifyCustomName メソッド (SheetView)


カスタム名の新しい名前。
カスタム名の名前を変更します。
構文
'Declaration
 
Public Function ModifyCustomName( _
   ByVal currentName As String, _
   ByVal newName As String, _
   ByVal sheetViewScope As Boolean _
) As Boolean
'使用法
 
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
)

パラメータ

currentName
newName
カスタム名の新しい名前。
sheetViewScope

戻り値の型

名前が変更された場合は true。それ以外の場合は false。
次のサンプルコードは、ModifyCustomNameメソッドを使用します。
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
参照

SheetView クラス
SheetView メンバ

 

 


© 2004-2017, GrapeCity inc. All rights reserved.