1

以前に見たデモから明らかに可能ですが、十分な詳細をキャッチできませんでした

次のような関数呼び出しを行うことを想定しています

=MyRTDReverse("keyvalue", "fieldName", [AC51])

また

=MyRTDReverse("keyvalue", [AB51], [AC51])  // where AB51 has the field name and AC51 has the field value

セル AC51 の値を更新すると、変更がトリガーされます

これがどのように機能するかについてのサンプル/パターンはありますか?

更新 - .Net 3.5 + VSTO UPDATE 2 を使用 - VSTO を使用せず、代わりに呼び出しルーチンのような UDF/RTD を作成することをお勧めします

4

1 に答える 1

0

セルの値の変更に基づいて何かをトリガーするには、Worksheet_Changeイベントを処理します。

Private Sub Worksheet_Change(ByVal Target As Range) 
    'here, check whether Target, a Range, is one of your "trigger" cells,
    'and if it is, react accordingly
End Sub 

カスタム関数を定義するには:

Function MyFunction(Argument1, Argument2)
    'do stuff with your arguments, and set MyFunction equal to the return value
End Function

セルでは、次のような関数を使用できます= MyFunction("value", 3)

于 2010-02-03T04:04:44.990 に答える