Using Macro Code Displaying the Names of Worksheets in a Workbook.
After executing this code it displaying all worksheets names one by one.
MACRO CODE:
Sub for_each()
Dim sh As Worksheet
For Each sh In Worksheets 'For Each Loop
MsgBox sh.Name 'Msgbox diplaying the Names
Next sh
End Sub
F5 - Execute the Program
No comments:
Post a Comment