Created
November 1, 2012 07:46
-
-
Save snaka/3992351 to your computer and use it in GitHub Desktop.
excelシートの一覧
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub create_sheet_index() | |
| Dim idx As Range | |
| Dim i As Integer | |
| ' #index という名前のシートに出力 | |
| Set idx = Worksheets("#index").Cells(3, 2) | |
| i = 1 | |
| For Each sht In ActiveWorkbook.Worksheets | |
| ' シート名の頭が#は取り込まない | |
| If Left(sht.Name, 1) <> "#" Then | |
| idx = CStr(i) | |
| idx.Offset(, 1) = sht.Name | |
| ' 次の表示位置へ | |
| Set idx = idx.Offset(1) | |
| i = i + 1 | |
| End If | |
| Next | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment