on-internet
← Community

How to add a named sheet at the end of all Excel sheets?

Stack Overflow ·

I am trying to add an Excel sheet named "Temp" at the end of all existing sheets, but this code is not working: Private Sub CreateSheet() Dim ws As Worksheet ws.Name = "Tempo" Set ws = Sheets.Add(After:=Sheets(Sheets.Count)) End Sub Can you please let me know why?

Comments

Sign in or sign up to comment and upvote.

No comments yet.