When you open the spreadsheet upDate a specific column

  • I have a UserForm with a text box that receives the following macro:

    Private Sub txtDueDate_Change ()
    On Error Resume Next
    If CDate (txtDateToday) <= CDate (txtDueDate) Then
    txtStatus = "OK"
    Else: txtStatus.Value = Abs (DateDiff ("d", CDate (txtDateToday), CDate (txtDueDate)))
    End If
    End Sub

    What we should do, when we opening the worksheet, the column "P" in the worksheet be automatically update with date difference.

  • Please take a few minutes and read the rules that you agreed to when you joined. This forum requests that you use code tags whenever you post code. I have added them for you today. Please use them in the future.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!