Hi,
I have the below at the moment but its just not quite what I want,
Private Sub CommandButton1_Click()
Dim sName As String
Sheets("REPORT").Copy After:=Sheets(Sheets.Count)
sName = Sheets("DATA").Range("G12")
On Error Resume Next
Do
ActiveSheet.Name = sName
If ActiveSheet.Name = sName Then Exit Do
sName = InputBox("Enter new valid worksheet name")
If sName = "" Then Exit Do
Loop
End Sub
My issue is that the next time I use this command button the sheet copied the first time is also updated with the new information, so its the same as the sheet just copied.
What I want to do is each time the sheet is copied to the end of the workbook it will reflect only what was on the main sheet at that time.
Hope this makes sense.....
I have the below at the moment but its just not quite what I want,
Private Sub CommandButton1_Click()
Dim sName As String
Sheets("REPORT").Copy After:=Sheets(Sheets.Count)
sName = Sheets("DATA").Range("G12")
On Error Resume Next
Do
ActiveSheet.Name = sName
If ActiveSheet.Name = sName Then Exit Do
sName = InputBox("Enter new valid worksheet name")
If sName = "" Then Exit Do
Loop
End Sub
My issue is that the next time I use this command button the sheet copied the first time is also updated with the new information, so its the same as the sheet just copied.
What I want to do is each time the sheet is copied to the end of the workbook it will reflect only what was on the main sheet at that time.
Hope this makes sense.....