+ Reply to Thread
Results 1 to 5 of 5

Select first row of currentregion

Hybrid View

  1. #1
    vba
    Guest

    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. #2
    NickHK
    Guest

    Re: 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" <macaroni_elleboogje@hotmail.com> wrote in message
    news:1153300786.676593.320670@h48g2000cwc.googlegroups.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. #3
    vba
    Guest

    Re: Select first row of currentregion


    Thank you Nick!


  4. #4
    Dave Peterson
    Guest

    Re: 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. #5
    NickHK
    Guest

    Re: Select first row of currentregion

    Knew there must a shorter way.

    NickHK

    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:44BE20F1.11213837@verizonXSPAM.net...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1