That's great work, thank you.
I added an Else command to it though as nothing happened if the place where the data was being saved to was emply but hope I did your code justice and not done it the wrong way.
Sub Save1()
If Application.WorksheetFunction.Count(Sheets("Saved").Range("B2:J10")) > 0 Then
Select Case _
MsgBox("Data exists in the target range. Continuing will overwrite this data. Continue?", _
vbYesNo Or vbExclamation Or vbDefaultButton1, "Data alert...")
Case vbYes
Sheets("Saved").Range("B2:J10").Value = _
Sheets("Project").Range("B2:J10").Value
Case vbNo
Exit Sub
End Select
Else
Sheets("Saved").Range("B2:J10").Value = _
Sheets("Project").Range("B2:J10").Value
MsgBox ("Your data has been saved to an empty location. ")
End If
End Sub
I did have a go at it but it was not as detailed or defined as your so big thanks for the code
Mine ended up something like this before I replaced it with yours.
YesNo = MsgBox("If your happy to carry on click Yes", vbYesNo + vbQuestion, "You may be about to save over old data.")
Select Case YesNo
Case vbNo
Exit Sub
End Select
Application.ScreenUpdating = False
Sheets("Project").Range("B2:J10").Copy
Sheets("Saved").Range("B12").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Range("L2").Select
The range is slightly different as there are 5 save options available, I dare say it could be done with better coding for the 5 but at least I can follow this way LOL.
Not quite what I wanted but it was a new piece of code for me
Bookmarks