VBA Macro to Insert the desired No.of Rows and Columns In a Active Sheet
Sub InsertRows()
Dim i as Integer, j as Integer
i = InputBox("Enter The No.of Rows Required ")
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(i - 1, 0)).Select
Selection.EntireRow.Insert
Sub InsertRows()
Dim i as Integer, j as Integer
i = InputBox("Enter The No.of Rows Required ")
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(i - 1, 0)).Select
Selection.EntireRow.Insert
j = InputBox("Enter The No.of Columns Required ")
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(0, j - 1)).Select
Selection.EntireColumn.Insert
End Sub
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(0, j - 1)).Select
Selection.EntireColumn.Insert
End Sub
Thanks,Tamatam
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.