PowerTools SPREAD for Windows Forms 10.0J
RemoveCustomName メソッド (ICustomNameSupport)


削除する名前
モデルからユーザー定義名を削除します。
構文
'Declaration
 
Sub RemoveCustomName( _
   ByVal name As String _
) 
'使用法
 
Dim instance As ICustomNameSupport
Dim name As String
 
instance.RemoveCustomName(name)
void RemoveCustomName( 
   string name
)

パラメータ

name
削除する名前
次のサンプルコードは、指定したカスタム名を削除します。
FarPoint.Win.Spread.Model.ICustomNameSupport cns;
DialogResult dlg;
cns = (FarPoint.Win.Spread.Model.ICustomNameSupport)fpSpread1.ActiveSheet.Models.Data;
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1);
cns.AddCustomName("GAMMA", "A1*A2", 2, 2);
fpSpread1.ActiveSheet.SetFormula(1, 1, "ALPHA");
fpSpread1.ActiveSheet.SetFormula(2, 2, "GAMMA");
fpSpread1.ActiveSheet.SetValue(0, 0, 10);
fpSpread1.ActiveSheet.SetValue(1, 0, 10);
dlg = MessageBox.Show("Do you want to remove the custom name?", "RemoveCustomName", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
     cns.RemoveCustomName("ALPHA");
     fpSpread1.ActiveSheet.RecalculateAll();
}
Dim cns As FarPoint.Win.Spread.Model.ICustomNameSupport
Dim dlg As DialogResult
cns = FpSpread1.ActiveSheet.Models.Data
cns.AddCustomName("ALPHA", "SUM(A1,A2)", 1, 1)
cns.AddCustomName("GAMMA", "A1*A2", 2, 2)
FpSpread1.ActiveSheet.SetFormula(1, 1, "ALPHA")
FpSpread1.ActiveSheet.SetFormula(2, 2, "GAMMA")
FpSpread1.ActiveSheet.SetValue(0, 0, 10)
FpSpread1.ActiveSheet.SetValue(1, 0, 10)
dlg = MessageBox.Show("Do you want to remove the custom name?", "RemoveCustomName", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
     cns.RemoveCustomName("ALPHA")
     FpSpread1.ActiveSheet.RecalculateAll()
End If
参照

ICustomNameSupport インタフェース
ICustomNameSupport メンバ

 

 


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