Quote:
Originally Posted by mmurphmsu
I am working on a VBA macro in Excel that will copy a sheet move it and then rename it based on what the user enters in a pop up box. Here is my code for the module:
-
-
frmShow.Show
-
-
Sheets("Jun 09 New").Select
-
Sheets("Jun 09 New").Copy Before:=Sheets(frmShow.txtCopySheet.Text)
-
Sheets("Jun 09 New (2)").Select
-
Sheets("Jun 09 New (2)").Move After:=Sheets(frmShow.txtCopySheet.Text)
-
Sheets("Jun 09 New (2)").Select
-
Sheets("Jun 09 New (2)").Name = frmShow.txtNewSheet.Text
-
Columns("I:I").Select
-
Selection.Copy
-
Columns("H:H").Select
-
Selection.Insert Shift:=xlToRight
-
Columns("J:J").Select
-
Application.CutCopyMode = False
-
Selection.ClearContents
-
Range("J1").Select
-
Selection.NumberFormat = "@"
-
Range("J1").Select
-
ActiveCell.FormulaR1C1 = frmShow.txtNewSheet.Text
-
Range("J2").Select
-
-
-
Where it has
Sheets("Jun 09 New") is there a way to put the text property of a text box like I have on this line of code
Sheets("Jun 09 New").Copy Before:=Sheets(frmShow.txtCopySheet.Text). It works as is, but I want to be able to have the user select a sheet to copy, then place it after that and name it the Name they put in the text box.
Looks like nice work partner, I'll send over to VBA for added input for ya... Hope you get what you're looking for.
Good luck!