LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default VB Code Is Not Working

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar code not working RobN[_3_] Excel Discussion (Misc queries) 9 May 17th 07 04:48 AM
Filter isn't working with a VBA Code [email protected] Excel Worksheet Functions 8 June 15th 06 01:20 PM
Why code for find() is not working jesmin Excel Discussion (Misc queries) 1 December 28th 05 08:43 PM
Code not working and can't see why Steve Excel Discussion (Misc queries) 3 December 31st 04 03:12 PM
Often-Used Code not working in a new Workbook Steve Excel Discussion (Misc queries) 2 December 16th 04 11:55 PM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"