ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform to have Last Updated Values Time & Date Displayed ?? (https://www.excelbanter.com/excel-programming/379371-userform-have-last-updated-values-time-date-displayed.html)

Corey

Userform to have Last Updated Values Time & Date Displayed ??
 
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....



Corey

Userform to have Last Updated Values Time & Date Displayed ??
 
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" wrote in message
...
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

Userform to have Last Updated Values Time & Date Displayed ??
 
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" wrote in message
...
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....








All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com