none
notification RRS feed

  • Question

  • Hi, 

    Can we get notification on system start up, if certain date passed in excel worksheet, as we desire ?

    It would be great help to remind important work to be done. 

    regards

    dockhem

    Monday, November 17, 2014 11:19 AM

Answers

  • for the message in your first worksheet:

    Private Sub Workbook_Open()

        If ThisWorkbook.Worksheets(1).Cells(1, 1).Value < Date Then
            Call MsgBox(ThisWorkbook.Worksheets(1).range("b10").value)
        End If
    End Sub

    You can address a worksheet by index, eg. ThisWorkbook.Worksheets(1)

    Or you can adress it by name: ThisWorkbook.Worksheets("sheet1")

    hope this helps.

    • Marked as answer by dockhem2 Friday, November 21, 2014 3:57 AM
    Tuesday, November 18, 2014 7:35 AM

All replies

  • Hello,

    try this code in your workbook open.  in the first worksheet, in the first cell should be your date.

    Private Sub Workbook_Open()

        If ThisWorkbook.Worksheets(1).Cells(1, 1).Value < Date Then
            Call MsgBox("here your notification")
        End If
    End Sub

    Hope it helps.

    • Proposed as answer by greenthnkr Monday, November 17, 2014 2:50 PM
    Monday, November 17, 2014 11:47 AM
  • Thank you Wouter Defour,

    This did not work for me.

    And this code is for worksheet open event, better if it work when window starts.

    regards

    dockhem

    Monday, November 17, 2014 12:01 PM
  • Hello,

    This event is the workbook open event (not worksheet). If you put this in your workbook, this is the first thing it will do.

    Best regards

    Monday, November 17, 2014 12:28 PM
  • Hi Wouter Defour,

    Thank you for you reply.

    How can we add message written in cell B10 in worksheet(1).

    How to do same with any worksheet. I tried but failed.

    Can we do ?

     


    • Edited by dockhem2 Tuesday, November 18, 2014 4:18 AM
    Tuesday, November 18, 2014 4:12 AM
  • for the message in your first worksheet:

    Private Sub Workbook_Open()

        If ThisWorkbook.Worksheets(1).Cells(1, 1).Value < Date Then
            Call MsgBox(ThisWorkbook.Worksheets(1).range("b10").value)
        End If
    End Sub

    You can address a worksheet by index, eg. ThisWorkbook.Worksheets(1)

    Or you can adress it by name: ThisWorkbook.Worksheets("sheet1")

    hope this helps.

    • Marked as answer by dockhem2 Friday, November 21, 2014 3:57 AM
    Tuesday, November 18, 2014 7:35 AM