Selecting entire row of data

2019-08-11 09:00发布

I have a row of data (A3 to A11) that I would like to select (there are no blanks in this range). I am using the following code:

Range(ws.Range("A3"), ws.Range("A3").End(xlToRight)).Select

However, this code is only selecting cell A3 and not A3 to A11. I have also tried xlToLeft and that still only selects A3 as well...How can I correct this? Thanks.

7条回答
够拽才男人
2楼-- · 2019-08-11 09:54

To select entire row Dynamically(current active cell), Try Below VBA code snippet:

ActiveSheet.Range(Selection, Selection).EntireRow.Select
查看更多
登录 后发表回答