Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help with date problem.

I have a date problem with an Excel user form that I would appreciate
some help with.

The user form is to input/save data to a spread sheet. It has various
controls all of which work ok except automatically inputing the date
that the record is created. The form has code that searches for a blank
row then saves the info.

I have tried =NOW() to generate the date which works but when I get it
into the form it has the formula which initially looks ok. However the
next time the spreadsheet is opened it is updated to the current date
rather than the record creation date. I also tried some date pickers
that kind of worked, but I wanted something as simple as possible. The
form is for a VERY new computer user with diabetes to record blood
sugar readings, notes, etc.

Any help appreciated as I am a hardware guy and am competely out of my
element.

Thanks,

Wiley
In HOT HOT Norcal

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Need help with date problem.

Use VBA to set the cell value to date and format it

e.g. Range("A1").Value = Format(Date,"dd mmm yyyy")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Wiley in Norcal" wrote in message
oups.com...
I have a date problem with an Excel user form that I would appreciate
some help with.

The user form is to input/save data to a spread sheet. It has various
controls all of which work ok except automatically inputing the date
that the record is created. The form has code that searches for a blank
row then saves the info.

I have tried =NOW() to generate the date which works but when I get it
into the form it has the formula which initially looks ok. However the
next time the spreadsheet is opened it is updated to the current date
rather than the record creation date. I also tried some date pickers
that kind of worked, but I wanted something as simple as possible. The
form is for a VERY new computer user with diabetes to record blood
sugar readings, notes, etc.

Any help appreciated as I am a hardware guy and am competely out of my
element.

Thanks,

Wiley
In HOT HOT Norcal



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help with date problem.

Assume rng is a reference to the cell wh ere you want the date

rng.Value = Now
or
rng.Value = date

Use date if you only want the month, day and year. If you want time as
well, use Now.

Using these VBA functions instead of putting a formula in the cell should
give you what you want.

--
Regards,
Tom Ogilvy

"Wiley in Norcal" wrote in message
oups.com...
I have a date problem with an Excel user form that I would appreciate
some help with.

The user form is to input/save data to a spread sheet. It has various
controls all of which work ok except automatically inputing the date
that the record is created. The form has code that searches for a blank
row then saves the info.

I have tried =NOW() to generate the date which works but when I get it
into the form it has the formula which initially looks ok. However the
next time the spreadsheet is opened it is updated to the current date
rather than the record creation date. I also tried some date pickers
that kind of worked, but I wanted something as simple as possible. The
form is for a VERY new computer user with diabetes to record blood
sugar readings, notes, etc.

Any help appreciated as I am a hardware guy and am competely out of my
element.

Thanks,

Wiley
In HOT HOT Norcal



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
date problem puiuluipui Excel Discussion (Misc queries) 6 March 16th 10 11:15 AM
date problem puiuluipui Excel Discussion (Misc queries) 11 November 4th 08 10:14 AM
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM
date problem bill gras Excel Worksheet Functions 6 October 16th 05 07:38 AM


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