Hi, I am pulling my hair out again trying to build a macro that copies a sheet and places it AFTER the copied sheet every time. Any help would be appreciated
Edit: I forgot to mention the sheet does not need to be renamed after its copied.
Hi, I am pulling my hair out again trying to build a macro that copies a sheet and places it AFTER the copied sheet every time. Any help would be appreciated
Edit: I forgot to mention the sheet does not need to be renamed after its copied.
Last edited by goatie43; 03-07-2015 at 12:54 PM. Reason: information
Let's see the code
![]()
Sub CopyRename() Dim sName As String Dim wks As Worksheet Worksheets("SETUP SHEET").Copy after:=sheet Set wks = ActiveSheet Do While sName <> wks.Name sName = Application.InputBox _ (Prompt:="Place Sheet Name") On Error Resume Next wks.Name = sName On Error GoTo 0 Loop Set wks = Nothing End Sub
![]()
Worksheets("SETUP SHEET").Copy after:=Sheets(Sheets.Count)
Last edited by davesexcel; 03-07-2015 at 01:01 PM.
Hi Dave, this is what i had originally but not what i was looking for. Tanks for the input.
The sheet I'm trying to copy is in the middle of my 40 tab workbook, and the sheet that i copy is in the middle so if i can get it to place exactly after the copied sheet that would be great. But i suck at this....
Hmmm... what indicates the sheet, or do you know exactly how many sheets from the last sheet?
Are you copying a sheet , and want it next to the sheet your copying?
Last edited by davesexcel; 03-07-2015 at 02:23 PM.
![]()
Worksheets("SETUP SHEET").Copy after:=Sheets("SETUP SHEET")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks