Hi Guys,
I have two macros I want to combine in order to create new clean, value only backups within my workbook.
I want to make a new sheet and name it with todays date. Then I want to go to ANY other sheet, copy all of it, and paste it to the new sheet with VALUES only.
I have two macros which do the two seperate parts. But my copy macro wants to pick a specific sheet only, whereas I want it to go to the new sheet.
Sub copy()
'
' copy Macro
'
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
> </o
>
'
Cells.Select
Range("T8").Activate
Selection.copy
Sheets("20 Oct 10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
<o
> </o
>
Sub NewSheet()
On Error GoTo Error
Dim AddSheet
Sheets.Add
AddSheet = Format(Date, "dd mmm yy")
ActiveSheet.Name = AddSheet
Exit Sub
Error:
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
MsgBox "A Sheet named " & AddSheet & " already exists."
End Sub
I have two macros I want to combine in order to create new clean, value only backups within my workbook.
I want to make a new sheet and name it with todays date. Then I want to go to ANY other sheet, copy all of it, and paste it to the new sheet with VALUES only.
I have two macros which do the two seperate parts. But my copy macro wants to pick a specific sheet only, whereas I want it to go to the new sheet.
Sub copy()
'
' copy Macro
'
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com




'
Cells.Select
Range("T8").Activate
Selection.copy
Sheets("20 Oct 10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
<o


Sub NewSheet()
On Error GoTo Error
Dim AddSheet
Sheets.Add
AddSheet = Format(Date, "dd mmm yy")
ActiveSheet.Name = AddSheet
Exit Sub
Error:
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
MsgBox "A Sheet named " & AddSheet & " already exists."
End Sub