Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I'm trying to make a code that alerts me when a cell is equal to today's date. The message spits out the value of a cell that is adjacent to the active cell but the code isn't working. Could someone please loot at it and tell me where I went wrong? Here's the Code::: Private Sub Workbook_Open() Dim Ws As Worksheets Dim sRange As Range Dim nDate As Date Dim RowId As Integer Dim lItem As Integer Ws = Worksheets("Slabber Reports") sRange = Ws("N8:N5000") nDate = Today() RowId = ActiveCell.Row For Each Item In sRange If sRange = nDate Then lItem = Range("B & RowId & ").FormulaR1C1 MsgBox "Line Item " & lItem & " Is Now Active. Please Perform The Appropiate Actions To Reflect This Activity", vbOKOnly Next Wend MsgBox "That's All For Today", vbOKOnly End If End Sub Thanks Very Much In Advance!!! Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calendar code not working | Excel Discussion (Misc queries) | |||
Filter isn't working with a VBA Code | Excel Worksheet Functions | |||
Why code for find() is not working | Excel Discussion (Misc queries) | |||
Code not working and can't see why | Excel Discussion (Misc queries) | |||
Often-Used Code not working in a new Workbook | Excel Discussion (Misc queries) |