#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform Label

HYCH

Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.

or is there another way to accomplish this ?

Steve

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Userform Label

You can just place the following function in the cell:

=TODAY()

if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:

Private Sub UserForm_Initialize()

ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"

End Sub

Change sheet name and range accordingly

--
Kevin Backmann


"Steve" wrote:

HYCH

Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.

or is there another way to accomplish this ?

Steve


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform Label

On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:

=TODAY()

if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:

Private Sub UserForm_Initialize()

ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"

End Sub

Change sheet name and range accordingly

--
Kevin Backmann



"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Sorry Kev,

did not make that as clear when i read it again, :(

Was looking for the Label to be updated on the userform with the date,

what i am looking for is a userform label to update itself
accordingly.

HYCH

Steve

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform Label

On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:

=TODAY()

if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:

Private Sub UserForm_Initialize()

ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"

End Sub

Change sheet name and range accordingly

--
Kevin Backmann



"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Thanks Kevin,

having read my post again i realise i never made it clear what i am
trying to achieve,

its not the cell i want to auto update, but the label in a userform

so that when a form is opened i want the current date to appear as a
title above a textbox

is this possible

Steve

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Userform Label

Got it.

Try this in the initialize event. I have a label named lblDate on the form
and it's assigned the current date.

Private Sub UserForm_Initialize()

Me.lblDate.Caption = Date

End Sub

or if you prefer the full date try this one

Private Sub UserForm_Initialize()

Me.lblDate.Caption = Format(Date, "dddd, mmmm d, yyyy")

End Sub

Hope that helps.
--
Kevin Backmann


"Steve" wrote:

On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:

=TODAY()

if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:

Private Sub UserForm_Initialize()

ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"

End Sub

Change sheet name and range accordingly

--
Kevin Backmann



"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Sorry Kev,

did not make that as clear when i read it again, :(

Was looking for the Label to be updated on the userform with the date,

what i am looking for is a userform label to update itself
accordingly.

HYCH

Steve




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Userform Label

See my previous post, it's not addressing the cell modification, it addresses
modifying the form label.
--
Kevin Backmann


"Steve" wrote:

On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:

=TODAY()

if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:

Private Sub UserForm_Initialize()

ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"

End Sub

Change sheet name and range accordingly

--
Kevin Backmann



"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Thanks Kevin,

having read my post again i realise i never made it clear what i am
trying to achieve,

its not the cell i want to auto update, but the label in a userform

so that when a form is opened i want the current date to appear as a
title above a textbox

is this possible

Steve


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform Label

On 29 Oct, 21:22, Kevin B wrote:
See my previous post, it's not addressing the cell modification, it addresses
modifying the form label.
--
Kevin Backmann



"Steve" wrote:
On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:


=TODAY()


if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:


Private Sub UserForm_Initialize()


ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"


End Sub


Change sheet name and range accordingly


--
Kevin Backmann


"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Thanks Kevin,


having read my post again i realise i never made it clear what i am
trying to achieve,


its not the cell i want to auto update, but the label in a userform


so that when a form is opened i want the current date to appear as a
title above a textbox


is this possible


Steve- Hide quoted text -


- Show quoted text -


Kev,

You Star, sorry for double post, was slower than i expected when i
reposted 1st time..lol



Steve

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Userform Label

On 29 Oct, 21:32, Steve wrote:
On 29 Oct, 21:22, Kevin B wrote:





See my previous post, it's not addressing the cell modification, it addresses
modifying the form label.
--
Kevin Backmann


"Steve" wrote:
On 29 Oct, 20:50, Kevin B wrote:
You can just place the following function in the cell:


=TODAY()


if you want to form to assign the value you can have the user form place the
date in the cell using the following code in the UserForm_Initialize event:


Private Sub UserForm_Initialize()


ThisWorkbook.Sheets(1).Range("A1").Formula = "=TODAY()"


End Sub


Change sheet name and range accordingly


--
Kevin Backmann


"Steve" wrote:
HYCH


Is there anyway I can link a userform label to a cell, i want the cell
to display the current date and change accordingly.


or is there another way to accomplish this ?


Steve- Hide quoted text -


- Show quoted text -


Thanks Kevin,


having read my post again i realise i never made it clear what i am
trying to achieve,


its not the cell i want to auto update, but the label in a userform


so that when a form is opened i want the current date to appear as a
title above a textbox


is this possible


Steve- Hide quoted text -


- Show quoted text -


Kev,

You Star, sorry for double post, was slower than i expected when i
reposted 1st time..lol

Steve- Hide quoted text -

- Show quoted text -


Kev,

Managed to get the following working thanks to you for your help,

Private Sub UserForm_Initialize()
Me.Label1.Caption = Format(Range("q12"), "ddd dd mmm")
Me.Label2.Caption = Format(Range("q13"), "ddd dd mmm")
Me.Label3.Caption = Format(Range("q14"), "ddd dd mmm")
Me.Label4.Caption = Format(Range("q15"), "ddd dd mmm")
Me.Label5.Caption = Format(Range("q16"), "ddd dd mmm")
Me.Label6.Caption = Format(Range("q17"), "ddd dd mmm")
Me.Label7.Caption = Format(Range("q18"), "ddd dd mmm")
End Sub

have 7 label, originally each was labelled day 1, day 2, etc


Much appreciation on the assistance :)

Steve

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
What does label do under Insert, Name, Label? trainer07 Excel Discussion (Misc queries) 2 April 18th 07 01:14 PM
How to rezize data label box in pie charts (label wraps to two lin rolliedogg Charts and Charting in Excel 1 October 18th 06 08:17 PM
COPY LABEL FORM FROM EXCEL TO A LABEL xrayAndi New Users to Excel 1 March 5th 06 02:21 PM
Identify Label €” More than one cell with label George Lynch Excel Discussion (Misc queries) 2 May 4th 05 05:12 PM
how to remove label formatting (eg label to number) sikkiekaka Excel Worksheet Functions 0 November 4th 04 11:35 PM


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