Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HowTo add and name 2 wks to wkbk
How do I add and name 2 new worksheets to my workbook? I
had previously deleted a worksheet and thought that the new sheet would be sheet1 but my code error because new sheet was sheet2. I want to add 2 sheets called "Final" and "ScrubData". I had: Sub InsertWorksheets() Dim i As Integer i=Sheet.Count+1 ' I error out here Sheets(i).Add ActiveSheets.Select ActiveSheet.Name="Final" ....confused. Can someone help this newbie? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HowTo add and name 2 wks to wkbk
Worksheets.Add.Name = "Final"
Worksheets.Add.Name = "ScrubData" -- HTH RP (remove nothere from the email address if mailing direct) "Dan" wrote in message ... How do I add and name 2 new worksheets to my workbook? I had previously deleted a worksheet and thought that the new sheet would be sheet1 but my code error because new sheet was sheet2. I want to add 2 sheets called "Final" and "ScrubData". I had: Sub InsertWorksheets() Dim i As Integer i=Sheet.Count+1 ' I error out here Sheets(i).Add ActiveSheets.Select ActiveSheet.Name="Final" ...confused. Can someone help this newbie? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
HowTo add and name 2 wks to wkbk
worksheets.Add(After:=Worksheets( _
Worksheets.count)).Name = "Final" worksheets.Add(After:=Worksheets( _ Worksheets.count)).Name = "ScrubData" -- Regards, Tom Ogilvy "Dan" wrote in message ... How do I add and name 2 new worksheets to my workbook? I had previously deleted a worksheet and thought that the new sheet would be sheet1 but my code error because new sheet was sheet2. I want to add 2 sheets called "Final" and "ScrubData". I had: Sub InsertWorksheets() Dim i As Integer i=Sheet.Count+1 ' I error out here Sheets(i).Add ActiveSheets.Select ActiveSheet.Name="Final" ...confused. Can someone help this newbie? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HowTo: Baseball Calculator? | Excel Discussion (Misc queries) | |||
howto: concat (x1:x3) | New Users to Excel | |||
Can't Alt Tab from wkbk to wkbk Help! | Excel Discussion (Misc queries) | |||
HOWTO Replace from Row | Excel Programming | |||
HOWTO Replace from Row | Excel Programming |