MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Shift key selection behavior in VBA code

Posted by Gail on August 15, 2001 4:18 PM

Does anyone know code to extend an active selection from an ActiveCell to the right, say 5 cells, so 6 cells are captured?

Posted by Russell Hauf on August 15, 2001 4:24 PM

Try this:

Sub TEST()


Range(ActiveCell, ActiveCell.Offset(0, 5)).Select

End Sub