#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Data Form

Can a Data Form field be automatically populated with current date? Tying to
avoid having users type in this field for every row entered.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Data Form

Steve,

Copy the code below, right click the sheet tab, select "View Code" and paste the code into the
window that appears.

This code will put the date into column A of any row where data is entered IF that cell is currently
blank.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(Target.Row, 1).Value < "" Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, 1).Value = Date
Application.EnableEvents = True
End Sub



"Steve" wrote in message
...
Can a Data Form field be automatically populated with current date? Tying to
avoid having users type in this field for every row entered.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Data Form

I appreciate the response very much Bernie. However this would appear to work
for a worksheet. I am attempting to get the date into a dataform that is to
be populated and can't enter a formula directly into the form. The worksheet
is only populated when Enter is pressed but the date would have already been
entered into the dataform.

"Bernie Deitrick" wrote:

Steve,

Copy the code below, right click the sheet tab, select "View Code" and paste the code into the
window that appears.

This code will put the date into column A of any row where data is entered IF that cell is currently
blank.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(Target.Row, 1).Value < "" Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, 1).Value = Date
Application.EnableEvents = True
End Sub



"Steve" wrote in message
...
Can a Data Form field be automatically populated with current date? Tying to
avoid having users type in this field for every row entered.




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
Create a form in excel so I can enter data using DataForm Lynn Excel Discussion (Misc queries) 2 February 14th 07 06:35 PM
how to get a data form to fill you own exel sheet (was data-form erik van buijtenen Excel Worksheet Functions 2 May 30th 06 05:31 PM
Data Form fishcents Excel Discussion (Misc queries) 1 November 11th 05 11:32 PM
format data displayed on Excel data entry form Bob, too Setting up and Configuration of Excel 0 May 19th 05 08:26 PM
have 3 worksheets, 1 is a form, the other 2 data for the form-wan. bken Excel Worksheet Functions 0 January 12th 05 09:15 PM


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