Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
create a copy of a sheet and insert it into the same workbook.
This is a piece of code I Got. For Each sh In ActiveWorkbook.Sheets ' below to check if there is a worksheet with the name locally stored data and if there is one then delet If sh.Name = "Locally Stored Data" Then Application.DisplayAlerts = False sh.Delete Application.DisplayAlerts = True End If Next sh ' copys a templatte sheet and then rename it and copy data etc. Sheets("Temp").Visible = True Sheets("Temp").Select ActiveSheet.Copy ActiveSheet.Name = "Locally Stored Data" Sheets("Temp").Visible = False Sheets("Data").Visible = True Range("A9").Select Selection.CurrentRegion.Select Selection.Copy Sheets("Locally Stored Data").Select Range("A2").Select It gets to the highlighted part and then copys the Sheet temp into a new workbook instead of keeping it in the same workbook. any ideas? -- funkymonkUK ------------------------------------------------------------------------ funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135 View this thread: http://www.excelforum.com/showthread...hreadid=387481 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selection copy and insert to other sheet | Excel Discussion (Misc queries) | |||
create copy of sheet tab (excel 2007) when opening workbook | Excel Worksheet Functions | |||
create a copy of a sheet and insert it into the same workbook. | Excel Programming | |||
How to create a Macro to Copy Information in one sheet to another sheet. | Excel Programming | |||
Insert Row & copy all formulas - shared workbook | Excel Programming |