Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: CurrentRegion

CurrentRegion analyses the filled cells and the blank cells surrounded by the rangeyou provide. Its returns a Range object as a region in Mxn shape.

Syntax:

RangeObject. CurrentRegion

Example:

Function FnCurrentRegion()

   Dim mainWorkBook As Workbook

   Set mainWorkBook = ActiveWorkbook

 With mainWorkBook.Sheets("Sheet1")

 .Range("H2").Value = 5

        .Range("I3").Value = 15

        .Range("H2").Activate

    End With   

    ActiveCell.CurrentRegion.Select 

 End Function
Current Region

Current Region

 

You may also like...

1 Response

  1. Hello there, just became aware of your blog through Google, and found that
    it’s really informative. I’m gonna watch out for brussels.

    I’ll be grateful if you continue this in future. Lots of people will be benefited
    from your writing. Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: