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 回答