Thursday, March 16, 2017

Worksheets exercise

Sub WorkSheets_Example()

Worksheets.Add      'Addition of worksheet
Worksheets.Add before:=Sheet3                                   'Addition of worksheet before
Worksheets.Add after:=Worksheets(Sheets.Count)       'Addition of worksheet after
Worksheets.Add after:=Worksheets(Sheets.Count),  Count:=3       'Addition of 3 worksheet after

Sheet1.Move after:=Sheets(Sheets.Count)      'moving of sheet
Worksheets("sheet28").Name = "somethingelse"       'Name change of sheet

Worksheets(5).Select        'Indexing of worksheets

End Sub

No comments:

Post a Comment

*INTERVIEW QUESTIONS

* Ques 01. What is the difference between ByVal and ByRef and which is default ? Ans-  ByRef : If you pass an argument by reference when...