Hi iktpq,
Could you explain what/when you want to happen if the conditions are not met? For example do you want to make it so that the workbook can't be saved if G7 = "internal" and D13 is empty? Or would you like a message to pop up if internal is entered in G7 prompting them to complete D13? Or make it so another sheet can't be selected? or make it so that only D13 can be selected? The possibilities are endless
Depends on how annoying you want it to be
example; if you put the below code in the "ThisWorksheet" module, the file cannot be saved if G7 = "internal" and D13 is empty
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If LCase(Sheets("Sheet1").Range("G7").Value) = "internal" And Sheets("Sheet1").Range("D13") = "" Then
SaveAsUI = False
MsgBox "A value must be entered in cell D13", vbExclamation
Sheets("Sheet1").Range("D13").Select
End If
End Sub
Cheers,
Alan.