Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
I have a workbook that contains 5 sheets. From time to time the user will
need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
asmenut,
There is an "After" option, too: ActiveSheet.Copy After:=ActiveSheet HTH, Bernie MS Excel MVP "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
Hi
Try this Worksheets.Add after:=Worksheets(ActiveSheet.Index) -- Regards Ron de Bruin http://www.rondebruin.nl "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
I'm sorry, I had a slight brain-freeze, and morphed your question from
adding to copying. I should have shown: Sheets.Add Type:="Worksheet", After:=ActiveSheet HTH, Bernie MS Excel MVP "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... asmenut, There is an "After" option, too: ActiveSheet.Copy After:=ActiveSheet HTH, Bernie MS Excel MVP "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
Or this...
Worksheets.Add after:=ActiveSheet (maybe better if you have non-worksheets in the workbook) Ron de Bruin wrote: Hi Try this Worksheets.Add after:=Worksheets(ActiveSheet.Index) -- Regards Ron de Bruin http://www.rondebruin.nl "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
Youngster!
Ron de Bruin wrote: You are right Dave (as always<g) -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Or this... Worksheets.Add after:=ActiveSheet (maybe better if you have non-worksheets in the workbook) Ron de Bruin wrote: Hi Try this Worksheets.Add after:=Worksheets(ActiveSheet.Index) -- Regards Ron de Bruin http://www.rondebruin.nl "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? -- Dave Peterson -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet Copy After:
Youngster!
LOL -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Youngster! Ron de Bruin wrote: You are right Dave (as always<g) -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Or this... Worksheets.Add after:=ActiveSheet (maybe better if you have non-worksheets in the workbook) Ron de Bruin wrote: Hi Try this Worksheets.Add after:=Worksheets(ActiveSheet.Index) -- Regards Ron de Bruin http://www.rondebruin.nl "asmenut" wrote in message ... I have a workbook that contains 5 sheets. From time to time the user will need to add a sheet after the active sheet. I know that there is a "Before" option, but is there a way that I can code (VBA) a way to insert the new sheet "After" the activesheet? -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
Copy Sheet to new Sheet and clear cells on original sheets | Excel Discussion (Misc queries) | |||
Auto Copy/autofill Text from sheet to sheet if meets criteria | Excel Discussion (Misc queries) | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) | |||
providing a sheet-copy event or copy CustomProperties | Excel Programming |