我正在开发一个MS Excel加载项。我想知道是否可以显示对话框,用户可以手动选择目标单元格,就像在MS Excel中执行函数时所获得的那样。
我是这个Excel加载项开发的新手。
提前致谢
不幸的是,QSTxswpoi控件在VSTO插件中不可用(它仅适用于VBA)。
但是,您可以通过使用RefEdit(打开模态形式)来实现类似的行为:
RefEdit
Application.InputBox
有些例子,请参阅Excel.Range rng= ExcelApp.InputBox("Select table range", "", _ Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, 8); 。
Excel.Range rng= ExcelApp.InputBox("Select table range", "", _ Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, 8);