Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-06-2016, 11:40 AM
barbd777 barbd777 is offline Auto-enter today's date with New Order Macro button? Windows 7 32bit Auto-enter today's date with New Order Macro button? Office 2010 32bit
Novice
Auto-enter today's date with New Order Macro button?
 
Join Date: Apr 2016
Posts: 4
barbd777 is on a distinguished road
Default Auto-enter today's date with New Order Macro button?

I need some coding help with a data entry form I've downloaded from contextures.com and customized for our company use. Sheet 1 (Input) is the data entry form, sheet 2 (RequestData) is the database sheet, sheet 3 (LookupLists) is for...Lookup Lists! Internal clients will fill out the form on sheet 1 (which is all they'll be able to see); then when they Submit the form, the data enters to sheet 2, and all the fields on sheet 1 clear for next use. I've gotten everything to work the way it's supposed to, but now I want to change/add a few functionalities and can't seem to find exactly what I'm looking for out on the web or in these forums. (I'm sure it's fairly simple if you have the coding knowledge!)

I have a "New Order" button on the data entry sheet that automatically pulls the next Order ID from a Lookup List on sheet3 and places it in the 1st field on the form. What I'd like to add to that macro is the code to automatically place today's date in the next field.

IDNum is the name of the Order ID field, NextID is the field name that it pulls from on LookupLists, using the formula:
=IFERROR(MAX(RequestData!C:C)+1,0)

I guess I would need to name the date field, i.e. "TodaysDate"? Would it also pull from info/formula added on LookupLists?

Thanks for any help you can offer!!!

Here's the macro code currently attached to that button:

Sub StartNewRecord()


Dim inputWks As Worksheet
Dim listWks As Worksheet
Dim rngClear As Range
Dim rngNext As Range
Dim rngID As Range

Set inputWks = Worksheets("Input")
Set listWks = Worksheets("LookupLists")

Set rngClear = inputWks.Range("DataEntryClear")
Set rngID = inputWks.Range("IDNum")
Set rngNext = listWks.Range("NextID")

rngClear.ClearContents
rngID.Value = rngNext.Value

inputWks.Activate
rngID.Offset(1, 0).Activate

End Sub
Reply With Quote
 

Tags
date, macro automatic



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-enter today's date with New Order Macro button? Show date instead of Today, Yesterday . . BrazzellMarketing Outlook 7 08-15-2013 07:32 AM
Auto-enter today's date with New Order Macro button? Today's Date Function freschij Excel 3 02-11-2011 10:21 AM
Creating an Auto-Calc'd Date? Today+7 Days? SoCalTelephone Word 0 10-06-2010 10:27 AM
new appointment date always reverts back to today's date msills Outlook 0 08-24-2007 08:57 AM
Auto-enter today's date with New Order Macro button? Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft