Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto run a macro when a date/time has occured - any thoughts?

Hi, I'm new to the board, I humbly ask for your acceptance... I work as a
cost estimator and have developed a very, very nice program to calculate the
selling price of our products. It incorporates Escalation, all direct labor
rates and overhead rates, is capable of time shifting to forward dates and
mid-points and so on. I have been "asked" by some of the people I answer to
for copies of this program, but I hesitate. If not all the adjustments are
kept up to date, the information can be eronious - and we all know "who will
be to blame" for eronious information. Here is what I want to do. I want to
have a macro that will delete all the pages then save the new file over top
of the old file. And if they have another copy - again, upon opening it, and
the statement seeing that the date has been passed - again activate the
macro. - forcing them to come back to me for another - which would be the
latest and greatest, right?
any thoughts? - Cheers to you all - and thanks for being here.
--
HW42
  #2   Report Post  
Posted to microsoft.public.excel.programming
Hal Hal is offline
external usenet poster
 
Posts: 36
Default Auto run a macro when a date/time has occured - any thoughts?

Here's a place to start, and there may be better solutions. Place the code in
a module. It will run each time the workbook is opened. If the exDate matches
the computers system date a message box is displayed and the the workbook is
closed.

Hal

Sub Auto_Open()
Dim exDate As Date, curDate As Date
exDate = DateSerial(2005, 10, 18)
curDate = Date
If curDate = exDate Then
MsgBox ("Get updated file from HW42!")
ThisWorkbook.Close SaveChanges:=False
End If
End Sub


"Hotwheels42" wrote:

Hi, I'm new to the board, I humbly ask for your acceptance... I work as a
cost estimator and have developed a very, very nice program to calculate the
selling price of our products. It incorporates Escalation, all direct labor
rates and overhead rates, is capable of time shifting to forward dates and
mid-points and so on. I have been "asked" by some of the people I answer to
for copies of this program, but I hesitate. If not all the adjustments are
kept up to date, the information can be eronious - and we all know "who will
be to blame" for eronious information. Here is what I want to do. I want to
have a macro that will delete all the pages then save the new file over top
of the old file. And if they have another copy - again, upon opening it, and
the statement seeing that the date has been passed - again activate the
macro. - forcing them to come back to me for another - which would be the
latest and greatest, right?
any thoughts? - Cheers to you all - and thanks for being here.
--
HW42

Reply
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
Time entry auto changes to date and then time ? Carol @ Prison[_2_] Excel Worksheet Functions 1 November 25th 09 10:01 PM
Auto Date & Time Keyrookie Excel Worksheet Functions 3 November 22nd 08 09:05 PM
Auto insert date/time Tino Excel Worksheet Functions 1 September 8th 06 05:58 PM
Finding Time that Max Occured RV Excel Discussion (Misc queries) 3 August 18th 06 04:25 PM
Auto insertion of date and time MC[_4_] Excel Programming 8 July 21st 04 03:54 PM


All times are GMT +1. The time now is 06:51 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"