Message pop-up in Windows

  • Thread starter That's Confidential
  • Start date
T

That's Confidential

I am creating a MS Excel spreadsheet.

I have set my spreadsheet so that if a date expires a certain date, the cell
shades in red. Now, what I would like to be able to do is make a message pop
up on the Desktop saying that "You have cards to dispose of!"

Any ideas how I could do that?

Would it be possible to do this without even opening Excel?
 
J

Jay Freedman

Hi Confidential

As you noted in your other post here, the proper place for Excel VBA
questions is a VBA newsgroup -- but not a *Word* VBA newsgroup. Try
microsoft.public.excel.programming.

As it happens, this particular question isn't strictly about Excel. All
Office applications can save "custom properties" in their documents. You can
create custom properties by going to the File > Properties dialog and
clicking the Custom tab, or by writing a macro to do it. In your case, you
want a macro to find the earliest expiration date on the sheet and put that
into a custom property (maybe named "Expire" or something like that). You
also want it to change to the next earlier date after the current one
expires. For advice on how to do those things, visit the excel.programming
newsgroup.

The next thing you need is a file called dsofile.dll that you can download
from the Microsoft web site. This file contains code that knows how to look
inside an Office file and read its properties without opening it. (It can't
read other data, just the properties.) See
http://word.mvps.org/FAQs/MacrosVBA/DSOFile.htm for discussion and links.

The last bit is to write a small program in a standalone programming
language such as VB, VB.Net, C++, etc. It has to call dsofile.dll to read
the Expire property in the worksheet, compare it to the current date, and
pop up the message if it's time. You probably shouldn't write this in VBA,
because that can run only when the host Office application (such as Excel)
is running. With a standalone program, you can put it in your Startup folder
to run when you boot in the morning, or put a task into the Windows
Scheduler to run it every few hours or whatever.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top