how do I get autodate to stay the date it was saved

T

totally lost

I use the formula =TODAY() often. But I want to know what to use when I want
to autodate today then when I go back into the worksheet tomorrow I want it
show yesterday's date not todays. Does that make any sense, lol
 
×

מיכ×ל (מיקי) ×בידן

Well..., consider the following suggestions in order to avoid the need for
VBA Macros.
1) Press: CTRL+; [CTRL+semicolon] to insert todays Date as TEXT.
2) If the cell already uses has the NOW() or TODAY() function - select that
cell > press [F9] and then [Enter].
Micky
 
T

totally lost

If I have to use the vba macro, I would rather do that. here is the macro
already in use, what would I have to add to this:
Public Sub SaveAsE5()
Dim ThisFile As String
Dim myPath As String

myPath = "S:\louis\refurb log"
If Right(myPath, 1) <> "\" Then
myPath = myPath & "\"
End If

ThisFile = ActiveSheet.Range("E5").Value
ActiveWorkbook.SaveAs Filename:=myPath & ThisFile
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True

מיכ×ל (מיקי) ×בידן said:
Well..., consider the following suggestions in order to avoid the need for
VBA Macros.
1) Press: CTRL+; [CTRL+semicolon] to insert todays Date as TEXT.
2) If the cell already uses has the NOW() or TODAY() function - select that
cell > press [F9] and then [Enter].
Micky


totally lost said:
I use the formula =TODAY() often. But I want to know what to use when I want
to autodate today then when I go back into the worksheet tomorrow I want it
show yesterday's date not todays. Does that make any sense, lol
 
D

Dave Peterson

Maybe...

Public Sub SaveAsE5()
Dim ThisFile As String
Dim myPath As String

myPath = "S:\louis\refurb log"
If Right(myPath, 1) <> "\" Then
myPath = myPath & "\"
End If

with Activesheet.range("A1")
.numberformat = "mmmm dd, yyyy"
.value = date - 1
end with

ThisFile = ActiveSheet.Range("E5").Value
ActiveWorkbook.SaveAs Filename:=myPath & ThisFile
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True

End sub

I didn't know what worksheet to use or what cell to use. So I used A1 of the
activesheet.

And I wasn't sure if the code should be done before the save or after the save.
You may want to move it.

totally said:
If I have to use the vba macro, I would rather do that. here is the macro
already in use, what would I have to add to this:
Public Sub SaveAsE5()
Dim ThisFile As String
Dim myPath As String

myPath = "S:\louis\refurb log"
If Right(myPath, 1) <> "\" Then
myPath = myPath & "\"
End If

ThisFile = ActiveSheet.Range("E5").Value
ActiveWorkbook.SaveAs Filename:=myPath & ThisFile
ActiveWindow.SelectedSheets.PrintOut Copies:=2, Collate:=True

מיכ×ל (מיקי) ×בידן said:
Well..., consider the following suggestions in order to avoid the need for
VBA Macros.
1) Press: CTRL+; [CTRL+semicolon] to insert todays Date as TEXT.
2) If the cell already uses has the NOW() or TODAY() function - select that
cell > press [F9] and then [Enter].
Micky


totally lost said:
I use the formula =TODAY() often. But I want to know what to use when I want
to autodate today then when I go back into the worksheet tomorrow I want it
show yesterday's date not todays. Does that make any sense, lol
 

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