Cur­ren­tRe­gion analy­ses the filled cells and the blank cells sur­rounded by the rangeyou pro­vide. Its returns a Range object as a region in Mxn shape.


RangeObject. CurrentRegion


Function FnCurrentRegion()

   Dim mainWorkBook As Workbook

   Set mainWorkBook = ActiveWorkbook

 With mainWorkBook.Sheets("Sheet1")

 .Range("H2").Value = 5

        .Range("I3").Value = 15


    End With   


 End Function
Current Region

Cur­rent Region


One Thought on “VBA-Excel: CurrentRegion

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

    I’ll be grate­ful if you con­tinue this in future. Lots of peo­ple will be ben­e­fited
    from your writ­ing. Cheers!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation