Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how do i get the name of a newly added sheet that i add with Sheets.Add in a vba macro in excel?
how do i get the name of a newly added sheet that i add with Sheets.Add in a
vba macro in excel? |
#2
|
|||
|
|||
Daniel
This is one way, but maybe not wholly satisfactory...this is a starting point (maybe) and you can tweak it... Sub getShtName() Dim shtCount As Integer Dim newSht As String shtCount = Worksheets.Count Sheets.Add.Move After:=Sheets(shtCount) newSht = Worksheets(shtCount + 1).Name End Sub This places a new sheet at the end and then gets the name of it. "Daniel" wrote: how do i get the name of a newly added sheet that i add with Sheets.Add in a vba macro in excel? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
data from one sheet to several in sequential order! | New Users to Excel | |||
Same cell added to master summary sheet | Excel Worksheet Functions | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
linking multiple sheets to a summary sheet | Excel Discussion (Misc queries) | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |