G
Guest
I have recorded a macro which copies a worksheet and its contents on to a new
worksheet. the sheets are named (19801, 19802, 19803, 19804 etc etc). When i
run the macro its fine for first one but when i run it again all it does is
copies the first workbook not the last one. So i need it to copy the last
numbered worksheet. Also as a part of the macro i want it to copy and paste
special, values only so it does not keep updateing itself with the formulas
so i have a history of sheets. Find below the code used.
Sub newsheet()
'
' newsheet Macro
' Macro recorded 08/10/2004 by Jason Watson
'
'
Sheets("19817").Select
Sheets("19817").Copy After:=Sheets(21)
Sheets("19817 (2)").Select
Sheets("19817 (2)").Name = "NEW, rename to next number"
Sheets("19817").Select
ActiveWindow.SmallScroll Down:=33
Range("A1:H67").Select
Range("H67").Activate
ActiveSheet.Shapes("Picture 1").Select
Range("D1").Select
ActiveWindow.SmallScroll Down:=36
Range("A1:H67").Select
Range("H67").Activate
Selection.Copy
ActiveWindow.SmallScroll Down:=-60
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("NEW, rename to next number").Select
ActiveWindow.SmallScroll Down:=-21
End Sub
HELP!!!!!!!
Justin
worksheet. the sheets are named (19801, 19802, 19803, 19804 etc etc). When i
run the macro its fine for first one but when i run it again all it does is
copies the first workbook not the last one. So i need it to copy the last
numbered worksheet. Also as a part of the macro i want it to copy and paste
special, values only so it does not keep updateing itself with the formulas
so i have a history of sheets. Find below the code used.
Sub newsheet()
'
' newsheet Macro
' Macro recorded 08/10/2004 by Jason Watson
'
'
Sheets("19817").Select
Sheets("19817").Copy After:=Sheets(21)
Sheets("19817 (2)").Select
Sheets("19817 (2)").Name = "NEW, rename to next number"
Sheets("19817").Select
ActiveWindow.SmallScroll Down:=33
Range("A1:H67").Select
Range("H67").Activate
ActiveSheet.Shapes("Picture 1").Select
Range("D1").Select
ActiveWindow.SmallScroll Down:=36
Range("A1:H67").Select
Range("H67").Activate
Selection.Copy
ActiveWindow.SmallScroll Down:=-60
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("NEW, rename to next number").Select
ActiveWindow.SmallScroll Down:=-21
End Sub
HELP!!!!!!!
Justin