ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select Until Empty Cell From VBA Code (https://www.excelbanter.com/excel-programming/322893-select-until-empty-cell-vba-code.html)

Eric

Select Until Empty Cell From VBA Code
 
Hi-

I am new to Excel programming and want to do a select a range starting from
a cell down the column until there is an empty cell from my VBA code.

This is the equivalent of selecting a cell on the worsheet and pressing
ctrl+shift+down arrow.

Can anyone post sample code for how to do this?

Thank you,

Eric

Neil

Select Until Empty Cell From VBA Code
 
Range(Selection, Selection.End(xlDown)).Select

will mimic the crtl+shift+down arrow.

Hope this helps

Neil
www.nwarwick.co.uk

"Eric" wrote:

Hi-

I am new to Excel programming and want to do a select a range starting from
a cell down the column until there is an empty cell from my VBA code.

This is the equivalent of selecting a cell on the worsheet and pressing
ctrl+shift+down arrow.

Can anyone post sample code for how to do this?

Thank you,

Eric



All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com