raccoon588
Board Regular
- Joined
- Aug 5, 2016
- Messages
- 118
I have a sheet in excel and i need it to guarantee that a range of cells have entered data before completing the macro. I can get it to verify one cell but not all the other cells i also need verified.
Code:
Sub CommandButton1_Click()
ActiveSheet.Unprotect
Dim nom As String
Dim path As String
If Range("H48") = "" Then
MsgBox ("You Messed Up"), ActiveSheet.Protect, exitsub
Else
path = "\\hinas1\MFG\S8WData\Christine Myhaver\Training"
nom = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "(" & Hour(Time) & "-" & Minute(Time) & ")-" & ActiveWorkbook.Name
ActiveWorkbook.SaveCopyAs path & "\" & nom
rep = MsgBox("Submited")
ActiveSheet.CheckBoxes.Value = False
Range("H48,G39,H39,G42,H42,G43,H43,G44,H44,G45,H45").ClearContents
ActiveSheet.Protect
Application.DisplayAlerts = False
Application.Quit
End If
End Sub