Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi Guys,
Need Help. I am writing a macro to add a worksheet within a workbook and named it "DrListWorkCopy". I then copy a range of cells from Worksheet "DrList" into it. How do I dictate that "DrListWorkCopy" is incerted right after worksheet "Targets" within the workbook? I tried: Set NewWks = Worksheets.Add After:=sheets("Targets") but got a syntax error. Here is how I coded the whole procedu Sub DuplicateDrList() Dim NewWks As Worksheet Dim SourceWks As Worksheet Set SourceWks = Sheets("DrList") Set NewWks = Worksheets.Add NewWks.Name = "DrListWorkCopy" With SourceWks .Range("A15:AJ" & SourceWks.Range("AJ65536").End(xlUp).Row).Copy Sheets("DrListWorkCopy").Paste End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open workbook to specific worksheet | Excel Programming | |||
Open Workbook to Specific Worksheet? | Excel Discussion (Misc queries) | |||
How to open a workbook on a specific worksheet. | Excel Worksheet Functions | |||
Copy Data from Workbook into specific Worksheet in other Workbook? | Excel Discussion (Misc queries) | |||
Open a specific worksheet in workbook | Excel Programming |