Hi There.... I am creating a code to prevent a user from doing "Save As" if not all boxes I designate are filled in based on other parameters on that excel sheet (such as certain cells having values). I have 35 different sheets that are all the same (it's for different devices being tested by our techs, we don't necessarily use every sheet every time) and one sheet that is different. I want excel to perform the code below (plus 22 other if's) on each page if the if and and statement is met.
This code doesn't seem to work though but no issues when compiling the code. Any help would be great. Below is my code:
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "BF" Then
End If
If Cells(17, 5) = "Reduced Pressure" And Cells(29, 5) = "" Then
MsgBox "CHECK #1 missing value on Worksheets.Name", vbExclamation, "Dignity Fire Protection"
Cancel = True
Application.Goto Cells(29, 5)
End If
If ws.Name Like "BF" Then
End If
If Cells(17, 5) = "Reduced Pressure" And Cells(31, 5) = "" Then
MsgBox "CHECK #2 missing value Worksheets.Name", vbExclamation, "Dignity Fire Protection"
Cancel = True
Application.Goto Cells(31, 5)
End If
This code doesn't seem to work though but no issues when compiling the code. Any help would be great. Below is my code:
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "BF" Then
End If
If Cells(17, 5) = "Reduced Pressure" And Cells(29, 5) = "" Then
MsgBox "CHECK #1 missing value on Worksheets.Name", vbExclamation, "Dignity Fire Protection"
Cancel = True
Application.Goto Cells(29, 5)
End If
If ws.Name Like "BF" Then
End If
If Cells(17, 5) = "Reduced Pressure" And Cells(31, 5) = "" Then
MsgBox "CHECK #2 missing value Worksheets.Name", vbExclamation, "Dignity Fire Protection"
Cancel = True
Application.Goto Cells(31, 5)
End If