Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
vba vba is offline
external usenet poster
 
Posts: 2
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
vba vba is offline
external usenet poster
 
Posts: 2
Default Select first row of currentregion


Thank you Nick!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select a range in a column in currentregion ward376 Excel Programming 6 March 14th 06 02:25 PM
currentregion flow23 Excel Discussion (Misc queries) 13 November 23rd 05 05:02 PM
CurrentRegion less one Row GregR Excel Programming 8 November 7th 05 05:16 PM
CurrentRegion Steph[_3_] Excel Programming 2 August 10th 04 07:00 PM
CurrentRegion Failure. Please help! John T Ingato Excel Programming 2 November 9th 03 11:12 PM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"