I\'m trying to read the ActiveCell from within an Excel Add-in but not getting very far. Anyone any ideas?
Excel.Window W = this.Application.ActiveWindow as Exce
Do not use Activewindow. modified your code as follows Excel.Range R = this.Application.ActiveCell as Excel.Range; if (R != null) MessageBox.Show(R.Value2);
Note: ActiveCell can be null if user have not chosen a cell in the active sheet.