Are there any errors in this vba event: Sub ServiceDueSoon() Dim wscf As Worksheet Dim…
Jump to turn (9)
- 1Are there any errors in this vba event: Sub ServiceDueSoon() Dim wscf As Workshe
- 2This VBA event did not catch the date value in H that was less than toadys date
- 3What I am trying to achieve in the code below is this; Find the next empty cell
- 4what does this VBA statement mean: wsjr.Cells(LastRowF, 6).Value = "Service Due
- 5What does this VBA statement mean: If Not copyRange Is Nothing Then wsjr.Range("
- 6Can you help me correct this statement: If Not copyRange Is Nothing Then LastRow
- 7In this VBA event below, I want the code to search for the condition that matche
- 8In this VBA event below, 'LastRowJ = wscf.Cells(wscf.Rows.Count, 9).End(xlUp).Ro
- 9Can you please write this as a VBA event: If sourceWB.ActiveSheet.Range("J31"0.V
- User
Are there any errors in this vba event: Sub ServiceDueSoon()
Dim wscf As Worksheet Dim wsjr As Worksheet Dim lastRow As Long Dim copyRange As Range Dim cell As Range
Set wscf = Sheets(Range("G3").Value) Set wsjr = Sheets("Start Page")
Range("F5:F8").Calculate Application.Wait (Now + TimeValue("0:00:01")) ActiveSheet.Range("G3").formula = ActiveSheet.Range("G3").formula Application.Wait (Now + TimeValue("0:00:01")) ActiveSheet.Range("H3").formula = ActiveSheet.Range("H3").formula
If ActiveSheet.Range("G3") = "" Or 0 Then Exit Sub End If
Dim LastRowJ As Long Dim lastRowF As Long Dim i As Long
Set wscf = Sheets(Range("G3").Value) Set wsjr = Sheets("Start Page") LastRowJ = wscf.Cells(wscf.Rows.Count, 9).End(xlUp).Row
If LastRowJ < 5 Then Exit Sub End If
lastRowF = wsjr.Cells(wsjr.Rows.Count, "F").End(xlUp).Row + 1 ' Add the label "Service Due Soon" in column F, row lastRowF wsjr.Cells(lastRowF, 6).Value = "Service Due Soon" ' move down to the next row lastRowF = lastRowF + 1 For i = LastRowJ To 1 Step -1 If wscf.Cells(i, "B") = "Service" Then If wscf.Cells(i, "H").Value < Date + 31 Then lastRowF = lastRowF + 1 End If Next i
Call LastTwentyJobs
End Sub