Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have an order sheet that I want to have the date added t
automatically as an order is entered. The date just has to be timilar to Microsoft Excels TODAY() functio but only entered once and not changeable after... I need the code to generate 'todays date' for entry into the sheet instead of having the user type the date in..... is this possible -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's easy to enter a date with code:
Sub EnterDate() Range("A1").Value = Now End Sub This assumes that the cell already has the date format you want. How you're going to make this code run is a more interesting question. -- Jim Rech Excel MVP "Souljah " wrote in message ... | Hi, I have an order sheet that I want to have the date added to | automatically as an order is entered. | The date just has to be timilar to Microsoft Excels TODAY() function | but only entered once and not changeable after... | | I need the code to generate 'todays date' for entry into the sheet, | instead of having the user type the date in..... | | is this possible? | | | --- | Message posted from http://www.ExcelForum.com/ | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
CDate(Now)
HTH, Greg "Souljah " wrote in message ... Hi, I have an order sheet that I want to have the date added to automatically as an order is entered. The date just has to be timilar to Microsoft Excels TODAY() function but only entered once and not changeable after... I need the code to generate 'todays date' for entry into the sheet, instead of having the user type the date in..... is this possible? --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there, Im more interested in the IF function way of doing it.
However, I need dates that stick on the day the order was entered. Wit the NOW function it will change everytime I enter the worksheet on different day won't it? If it is possible to have the date stick I'd be interested in usin that instead of VB code. However with the VB code u guys gave me where would I enter it? An would I have it with a text box or without -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can only help with the VB Code side of things here
If you put this code in the Worksheet that you are working on (right click the tab and choose View code) select worksheet from the dropdown list on the left and Change from th one on the right then input something like this Private Sub Worksheet_Change(ByVal Target As Range) With Range("A" & Target.Row) If .Value = "" Then .Formula = CDate(Now) End If End With End Sub this assumes that the date goes into column A HTH Davi -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Making a form visible | Excel Discussion (Misc queries) | |||
HELP! Making A Form | Excel Worksheet Functions | |||
Making form using Excell Help ASAP! | Excel Discussion (Misc queries) | |||
Making a new form | Excel Discussion (Misc queries) | |||
Making a form with only a certain amount of rows used | Excel Programming |