PC Review


Reply
Thread Tools Rate Thread

Check a value every time excel is loaded

 
 
Subodh
Guest
Posts: n/a
 
      28th Jul 2011
I will get an example to demonstrate my problem.
I have worksheet with data in range A1 to A100 and B1 to B100
Lets say it shows the todays date in A1 to A100 and due date for
paying bill in range B1 to B100 for grocery, phone etc.
If the due date is today (ie A1 = B1) then the excel should
show a message. But, I would like to do that without opening the excel
file.
The problem is to check the values in those cells each time
excel loads (preferably by loading an Addin) and then display a
message if the specified criteria is met.
Thanks in advance.
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jul 2011
Posts: 20
 
      28th Jul 2011
Just keep the file hidden - though you will need to unhide it to enter new values. Store it in your default XLStart folder so that it is opened, or save it as an add-in and install it.
You can use the workbook open event - put you don't need today's date in column A, though you could put some identifying string in column A, with the due date in column B. Copy the code into the ThisWorkbook object's codemodule.

Bernie

Private Sub Workbook_Open()
Dim i As Long
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Date = Cells(i, 2).Value Then
MsgBox "Pay the bill: " & Cells(i, 1).Value
End If
Next i
End Sub
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i check system time zone from excel? Yuvi Microsoft Excel Programming 5 13th May 2009 07:57 PM
Check time available in Excel =?Utf-8?B?UGVuZGVsZmlu?= Microsoft Excel Misc 0 23rd Jan 2006 10:30 AM
User Control - Check if Initialized / Being loaded for the first time???? Lucas Tam Microsoft ASP .NET 0 22nd Jun 2005 08:12 PM
Check Excel's state to see if a workbook is loaded in App Chris w. Microsoft Excel Programming 3 24th Feb 2005 11:46 PM
Excel Formula help (Check if a time falls between to time arguments) Healingbear Microsoft Excel Misc 1 28th Jan 2004 10:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:47 AM.