Be the first user to complete this post

  • 0
Add to List

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.


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
Current Region

Also Read:

  1. VBA-Excel: String Functions – Mid()
  2. VBA-Excel: String Functions – RTrim()
  3. VBA-Excel: Array Functions – LBound and UBound()
  4. WorkBooks and WorkSheets
  5. Introduction to Excel WorkBook
  6. VBA-Excel: Array Functions – Join() – Converts Array to String
  7. Excel-VBA : Range - Lock/Unlock Specific Cells
  8. VBA-Excel : Strings Functions – Left