T
Todd Huttenstine
The below code creates a new sheet, however when the new
sheet is created, it is placed in the first sheet
position. I would like the newly created sheet to be
placed at the end of all the other sheets. How do I do
this?
Thanx
Private Sub CommandButton1_Click()
Dim sha As Worksheet
Dim shar As Worksheet
Set sha = Worksheets(1)
Set shar = ActiveWorkbook.Worksheets.Add
sha.Cells.Copy
shar.Cells.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
shar.Cells.PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
shar.Name = sha.Range("E2").Value
ActiveWindow.DisplayZeros = False
Worksheets(2).Select
End Sub
sheet is created, it is placed in the first sheet
position. I would like the newly created sheet to be
placed at the end of all the other sheets. How do I do
this?
Thanx
Private Sub CommandButton1_Click()
Dim sha As Worksheet
Dim shar As Worksheet
Set sha = Worksheets(1)
Set shar = ActiveWorkbook.Worksheets.Add
sha.Cells.Copy
shar.Cells.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
shar.Cells.PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
shar.Name = sha.Range("E2").Value
ActiveWindow.DisplayZeros = False
Worksheets(2).Select
End Sub