An answer to the issue (= getting the name of the sheet where the code is written, not the name of the active sheet) is Me.Name. If you want the sheet number (=the codename), just use Me.CodeName.