I work with VSTO. There is asituation in this, in which, when you click the Excel sheet button, an input window will be displayed, and I will get the selected range. I want to know how to get the selected range from the hac input window with the active cell address of the Excel sheet.
object objInputBox= Excel.Application.InputBox(prompt, field, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, 8);
ExcelXP.Range selectedRange = objInputBox as Excel.Range;
string rangeName = selectedRange.get_Address(Type.Missing, Type.Missing, Excel.XlReferenceStyle.xlA1, Type.Missing, Type.Missing);
string activeCell =Application.Application.ActiveCell.get_Address(true, true, Excel.XlReferenceStyle.xlA1, Type.Missing, Type.Missing);
How can I get the active cell address in rangeName?
Thanks in advance
source
share