![Vba excel how many rows used in a sheet](https://kumkoniak.com/96.jpg)
Step 1: First, let us create another worksheet in the workbook as shown below, Now in this method, first, we will add another worksheet manually using the + sign in the workbook and delete it using the worksheet object in VBA. Step 4: Execute the above code and see the result in the workbook as follows, Step 3: Now, if we can see the original name of the sheet before this code, as shown below, Worksheets("Sheet3").Name = "Sheet Third" Step 2: In order to change the worksheet 3 name, we need to use the. Step 1: Again in the same module, define the next subprocedure for the third example, Now let us try to rename a worksheet name using the worksheet object. Since our selection was sheet 2 in the first example, This method not only selected sheet 1 for us but also we were able to put a value in cell A1. Step 4: Execute the above code and see the result in sheet 1 as follows, Step 3: Now, we will use the range property to put a random value in cell A1 as shown below, Step 2: First, let us activate sheet 1 using the worksheet object as follows, Step 1: In the same module, define another subprocedure for our next example as follows, We can use the Activate method and put a random value. To do this, we can either select sheet 1 as shown above and then use the command to put a random value in the active sheet, which is sheet 1. Now we have sheet 2 selected, but we want to put data in cell A1 of sheet 1.
![vba excel how many rows used in a sheet vba excel how many rows used in a sheet](https://cdn.educba.com/academy/wp-content/uploads/2019/06/VBA-Last-Row.png)
We can see that sheet 2 has been selected. Step 6: Execute the above code and see the result in the workbook as follows, Select the method we are using for this object.
![vba excel how many rows used in a sheet vba excel how many rows used in a sheet](https://www.howtogeek.com/wp-content/uploads/2013/05/image46.png)
Step 5: The method to select sheet 2 using the worksheet object is as follows, Step 4: Since we can see that we have three different worksheets in our workbook as sheet 1, sheet 2 and sheet 3.
![vba excel how many rows used in a sheet vba excel how many rows used in a sheet](https://www.excelhow.net/wp-content/uploads/2020/10/count-non-blank-nonempty-cells5.png)
Step 3: Now define a subprocedure as shown below, Step 2: Now, once we click on it, we are in the VB Editor, and we can insert a new module from the insert tab where we will be writing all of our examples,
![Vba excel how many rows used in a sheet](https://kumkoniak.com/96.jpg)