Autodate On Excel Vb Field
Posted 01 June 2012 - 02:30 PM
I have managed to create a userform in excel & have managed to set one of the fields to include a value that never changes (account name)
What I am having problems with is setting the field up in VB to insert the current date.
Can anyone advise of code to use for this please as it has been driving me nuts & time wasted on google with no success.
I can post the code in here if needed
Posted 19 June 2012 - 12:15 AM
Dim dv As Date
dv = DateValue(Now)
Then apply that to the field you need the first time.
If you are updating, copy the field data and re-apply instead of updating with a new date. There are better ways to do this but I've had a few bevies.
I may be 100% off track though...
Posted 19 June 2012 - 12:17 AM
The VB code will work for inserting the current date. You may need to change the locale to get a UK date as the default is normally US.
Posted 19 June 2012 - 12:23 AM
You, the lovechild of Pistonbroke?
Posted 03 July 2012 - 08:54 PM