Can you please help me to construct a VBA event that can incorporate all the conditions…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
Can you please help me to construct a VBA event that can incorporate all the conditions I am trying to build below:
Application.EnableEvents = False Application.ScreenUpdating = False
ActiveSheet.Range("A1:A60").Calculate ActiveSheet.Range("AA1:AA60").Calculate
Call Module3.CopyYDN5 Application.Wait Now + TimeValue("00:00:03")
Call ClearCellBackgroundColors
codeDim Sh As Worksheet Dim Op As Worksheet Set Sh = ThisWorkbook.Sheets("Daily") Set Op = ThisWorkbook.Sheets("Open") Application.CalculateIf Sh.Name = "Daily" Then If Sh.Range("AA1").Value <> Date And If Op.Range("F14").Value <> 0 Then
Check range G3:G13 for all instances of the word "Incomplete" Ignore empty cells where the word "Incomplete" is found dispaly the Offset(0, -3).Value within the nessage at the points in the code marked # and where more than one is found list them below each other
MsgBox "Incomplete Scoring was found for the:" & vbCrLf & vbCrLf & _ # "Please complete scouring as required then" & vbCrLf & vbCrLf & _ "close this workbook, an Print the Task Sheet(s)", vbCritical, "PRINT TASK SHEETS" Exit Sub
Check range G3:G13 for all instances of non-blank cells Ignore empty cells where a non-blank cell is found and the Offset(0, -2).Value is blank dispaly the Offset(0, -3).Value within the nessage at the points in the code marked ## and where more than one is found list them below each other
ElseIf Sh.Range("AA1").Value <> Date And If Op.Range("B14").Value <> 0 Then MsgBox "The following Task Sheets have not been Printed" & vbCrLf & vbCrLf & _ ## "Close this workbook, an Print the Task Sheet(s)", vbCritical, "PRINT TASK SHEETS" Exit Sub
ElseIf Dim answer As VbMsgBoxResult answer = MsgBox("HAVE YOU PRINTED ALL STAFF SCHEDULE SHEETS FOR TODAY?" & vbCrLf & vbCrLf & _ "Do not update this sheet until you have done so" & vbCrLf & vbCrLf & _ "Yes - Sheets PRINTED, No - Sheets NOT PRINTED", vbQuestion + vbYesNo, "Confirmation") If answer = vbNo Then
Application.ScreenUpdating = True Application.EnableEvents = True ActiveSheet.Protect Password:="edit" ' Lock Exit Sub Else SaveLastPrintedDate Op.Range("B3:C13").ClearContents Op.Range("E3:G13").ClearContents End If End If End If
codeCall TaskBackUpEnd Sub
- Assistant