SyntaxFix
Write A Post
Hire A Developer
Questions
ThisWorkbook.Sheets.Add After:=Sheets(Sheets.Count) ActiveSheet.Name = "XYZ"
(when you add a worksheet, anyway it'll be the active sheet)