Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John W
 
Posts: n/a
Default How do I change the value in cell based on a future date

I would like certain cells to be cleared after a certain date
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

one way:

Put this in the ThisWorkbook code module (Right-click the workbook title
bar and choose View Code):

Public Sub Workbook_Open()
If Date #12/15/2004# Then _
Sheets("Sheet1").Range("A1,B2,J10,K39").ClearConte nts
End Sub

Note that this won't work if the user opens your workbook with macros
disabled.

Note also that there's no way to prevent a user from accessing your data
- i.e., they can set their clock back and open the file. You can make
things more difficult, but not much...


In article ,
John W <John wrote:

I would like certain cells to be cleared after a certain date

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

And just to add to JE's post...

If the user allows this macro to run, then those cells will be cleared each time
the workbook opens.



JE McGimpsey wrote:

one way:

Put this in the ThisWorkbook code module (Right-click the workbook title
bar and choose View Code):

Public Sub Workbook_Open()
If Date #12/15/2004# Then _
Sheets("Sheet1").Range("A1,B2,J10,K39").ClearConte nts
End Sub

Note that this won't work if the user opens your workbook with macros
disabled.

Note also that there's no way to prevent a user from accessing your data
- i.e., they can set their clock back and open the file. You can make
things more difficult, but not much...

In article ,
John W <John wrote:

I would like certain cells to be cleared after a certain date


--

Dave Peterson
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
How would I change a date cell to decrease it by business days? CNGracin Excel Discussion (Misc queries) 3 December 15th 04 05:20 PM
How do I add a date formula to a cell but hide the contents with . Emzy Wemzy Excel Discussion (Misc queries) 2 December 12th 04 01:48 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 02:48 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 09:22 PM.

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

About Us

"It's about Microsoft Excel"