Home » excel » c# – Excel VSTO set selection

c# – Excel VSTO set selection

Posted by: admin April 23, 2020 Leave a comment

Questions:

How do I set the selection in the active worksheet to a specific Range, using C# and VSTO 2008?

How to&Answers:
Range currentCells = activeSheet.get_Range("A1", "E1"); 
currentCells.Select();

Answer:

You can also use

currentCells.Activate();