ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select first row of currentregion (https://www.excelbanter.com/excel-programming/367641-select-first-row-currentregion.html)

vba

Select first row of currentregion
 
Hi all,

Could anyone perhaps help me with the following: I am trying to select
the first row of my file using visual basi. But I would like to select
only the cells of the first line in the currentregion, that is the
cells that contain a value. Is there some simple code to do this?

Thanks a lot!


NickHK

Select first row of currentregion
 
There's probably a better way but:
ActiveCell.CurrentRegion.Range(Cells(1, 1), Cells(1,
ActiveCell.CurrentRegion.Columns.Count)).Select

NickHK

"vba" wrote in message
oups.com...
Hi all,

Could anyone perhaps help me with the following: I am trying to select
the first row of my file using visual basi. But I would like to select
only the cells of the first line in the currentregion, that is the
cells that contain a value. Is there some simple code to do this?

Thanks a lot!




vba

Select first row of currentregion
 

Thank you Nick!


Dave Peterson

Select first row of currentregion
 
Another way:

ActiveCell.CurrentRegion.Rows(1).Select



vba wrote:

Hi all,

Could anyone perhaps help me with the following: I am trying to select
the first row of my file using visual basi. But I would like to select
only the cells of the first line in the currentregion, that is the
cells that contain a value. Is there some simple code to do this?

Thanks a lot!


--

Dave Peterson

NickHK

Select first row of currentregion
 
Knew there must a shorter way.

NickHK

"Dave Peterson" wrote in message
...
Another way:

ActiveCell.CurrentRegion.Rows(1).Select



vba wrote:

Hi all,

Could anyone perhaps help me with the following: I am trying to select
the first row of my file using visual basi. But I would like to select
only the cells of the first line in the currentregion, that is the
cells that contain a value. Is there some simple code to do this?

Thanks a lot!


--

Dave Peterson





All times are GMT +1. The time now is 11:55 AM.

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