![]() |
now()
Good morning,
How can I make the now() function static? What I am trying to do is we submit our timesheet every week. I have a macro set up to write the date that submit in Cell F1 using now(). The problem is when we open the same timesheet next time, the date will change to that current date. I want the date to be the same date that I submit my timesheet and want the date to be in the format "10/26/05". I tried using quotes around the now() function, and it returns value instead of date. Any other suggestions are welcomed. Thanks. |
now()
If you are using a macro to enter the date, first test the value of F1 to
see if it is blank. If Range("F1").Value = "" Then Range("F1").Value = Now() -- Ian -- "AccessHelp" wrote in message ... Good morning, How can I make the now() function static? What I am trying to do is we submit our timesheet every week. I have a macro set up to write the date that submit in Cell F1 using now(). The problem is when we open the same timesheet next time, the date will change to that current date. I want the date to be the same date that I submit my timesheet and want the date to be in the format "10/26/05". I tried using quotes around the now() function, and it returns value instead of date. Any other suggestions are welcomed. Thanks. |
now()
You must be putting the function NOW() in F1. Try this tiny macro:
Sub mac() Cells(1, 6) = Now() End Sub This put the value of NOW() in F1. It will not change unless you run the macro again. -- Gary''s Student "AccessHelp" wrote: Good morning, How can I make the now() function static? What I am trying to do is we submit our timesheet every week. I have a macro set up to write the date that submit in Cell F1 using now(). The problem is when we open the same timesheet next time, the date will change to that current date. I want the date to be the same date that I submit my timesheet and want the date to be in the format "10/26/05". I tried using quotes around the now() function, and it returns value instead of date. Any other suggestions are welcomed. Thanks. |
now()
|
now()
Try using those macros to switch between Auto & Manual Calculation.
Sub Calcul_Manual() Application.Calculation = xlManual End Sub Sub Calcul_Auto() Application.Calculation = xlAutomatic End Sub I'd recommend putting two macro buttons in your worksheet. And this procedure will switch to Manual when the file is closed: Sub Auto_Close Calcul_Manual End Sub --- Tomek Polak, http://vba.blog.onet.pl |
now()
Sorry, this was not precise. Calculation is a general trait for the
whole Excel, not for one workbook. Public Calcul_Status ' will remember if Manual or Auto on Open = Default Sub Auto_Open() Calcul_Status = Application.Calculation Calcul_Manual ' forces Manual Calculation End Sub Sub Auto_Close() Application.Calculation = Calcul_Status ' returns to the Default End Sub |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com