Sunday, April 10, 2022

Create a new sheet at the end of all sheet with a name stored in a variable using vba

  

dim wd as worksheet

dim newsheetname as sring

newsheetname="NewSheet"

 

Set wd = .Sheets.Add(After:=.Sheets(.Sheets.Count))
    wd.Name = newsheetname
    End With

No comments:

Post a Comment