[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Userform to have Last Updated Values Time & Date Displayed ??

Corey

12/13/2006 11:16:00 PM

I have a Userform that displays several values, and asks for an update of
the values.
The user may update them or leave them blank for No Changes to the Values.

What i want to do is place a comment or Label that displays on the userform,
the previous time and date the values(at least 1) was modified/updated.

How can i do this?

Do i add a Label or a Text Box ?
And how would i code that to suit this?

Corey....


2 Answers

Corey

12/14/2006 12:14:00 AM

0

Currently i do not store any times/dates for the running or modifying of
this u/form or values on it.
How do i set that up 1st?
Corey....
"Alok" <Alok@discussions.microsoft.com> wrote in message
news:ECF35095-B20C-49FF-B8FF-E904FDEB1E2E@microsoft.com...
> Hi Corey
>
> Do you store the time when the value was changed last? Where. In any case
> since this value is to be shown only as a comment it is better to use a
> label
> rather than a text box. You can also use a ControlTipText property rather
> than a text box or a label.
>
> Alok
>
>
> "Corey" wrote:
>
>> I have a Userform that displays several values, and asks for an update of
>> the values.
>> The user may update them or leave them blank for No Changes to the
>> Values.
>>
>> What i want to do is place a comment or Label that displays on the
>> userform,
>> the previous time and date the values(at least 1) was modified/updated.
>>
>> How can i do this?
>>
>> Do i add a Label or a Text Box ?
>> And how would i code that to suit this?
>>
>> Corey....
>>
>>
>>


Martin Fishlock

12/14/2006 3:15:00 AM

0

In your data work sheet add a column/cell for last updated and set the
default to say 1/1/1990.

Then you add a label to the user form and set the label to the last updated
value.
you need to do this in the userform_initialize event

eg

datelastupdated=worksheets("sheet1").range("A1")
'cell where last update is
if datelastupdated <> #01/01/1990# then
me.labellastupdate="Last updated: at " & format( _
datelastupdated , "Hh:Nn ""on"" dd/mm/yyyy")
end if

unless the form is bound to data in which case you need to bind the label to
the data (not sure if that is possible, may need a text box in that case (but
can set it to fixed)).

--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"Corey" wrote:

> Currently i do not store any times/dates for the running or modifying of
> this u/form or values on it.
> How do i set that up 1st?
> Corey....
> "Alok" <Alok@discussions.microsoft.com> wrote in message
> news:ECF35095-B20C-49FF-B8FF-E904FDEB1E2E@microsoft.com...
> > Hi Corey
> >
> > Do you store the time when the value was changed last? Where. In any case
> > since this value is to be shown only as a comment it is better to use a
> > label
> > rather than a text box. You can also use a ControlTipText property rather
> > than a text box or a label.
> >
> > Alok
> >
> >
> > "Corey" wrote:
> >
> >> I have a Userform that displays several values, and asks for an update of
> >> the values.
> >> The user may update them or leave them blank for No Changes to the
> >> Values.
> >>
> >> What i want to do is place a comment or Label that displays on the
> >> userform,
> >> the previous time and date the values(at least 1) was modified/updated.
> >>
> >> How can i do this?
> >>
> >> Do i add a Label or a Text Box ?
> >> And how would i code that to suit this?
> >>
> >> Corey....
> >>
> >>
> >>
>
>
>