Tuesday, September 16, 2008
Range.Offset[a, b].value , when using VBA is a great way to add values to adjacent cells without having to actually select every cell you write to (which is very slow as it requires the UI). When I started using VSTO I could only find the Offset method attached to the strongly typed Named_Range object.
Luckily, it does exist for a regular range, except the method is called get_Offset (obviously).
So there you have it. Sounds simple, but this has been frustrating me for a couple of weeks now.
rangeObject.get_Offset[1, 2];