Last active
August 29, 2015 14:25
-
-
Save ooltcloud/2785b131e9c625141404 to your computer and use it in GitHub Desktop.
ワークシートのセルに自身の Worksheet 名などを表示する関数
This file contains 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
' 標準モジュールに作成する | |
' 自ワークブック名を取得する | |
' 使い方) =ThisWorkbookName() | |
Function ThisWorkbookName() As String | |
Application.Volatile | |
ThisWorkbookName = Application.ThisWorkbook.Name | |
End Function | |
' 自ワークシート名を取得する | |
' 使い方) =ThisWorksheetName() | |
Function ThisWorksheetName() As String | |
Application.Volatile | |
ThisWorksheetName = Application.Caller.Worksheet.Name | |
End Function | |
' 指定のワークシート名を取得する | |
' 使い方) =WorksheetName(1) | |
Function WorksheetName(index As Integer) As String | |
Application.Volatile | |
WorksheetName = Application.Sheets(index).Name | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment