Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Userform format question

Hi,

I would like to display the current time in either a label
or textbox. Could you please advise how to format.

Thanks a bunch,

Martha
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Userform format question

Hi Martha,

Try this.

lblTime.Caption & Format(Time, "hh:mm AM/PM")


-----Original Message-----
Hi,

I would like to display the current time in either a

label
or textbox. Could you please advise how to format.

Thanks a bunch,

Martha
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Userform format question

I think you mean

lblTime.Caption = Format(Time, "hh:mm AM/PM")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"mark" wrote in message
...
Hi Martha,

Try this.

lblTime.Caption & Format(Time, "hh:mm AM/PM")


-----Original Message-----
Hi,

I would like to display the current time in either a

label
or textbox. Could you please advise how to format.

Thanks a bunch,

Martha
.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Userform format question

It doesn't like the "&" but wotrks with "="

Thank you very much.


-----Original Message-----
Hi Martha,

Try this.

lblTime.Caption & Format(Time, "hh:mm AM/PM")


-----Original Message-----
Hi,

I would like to display the current time in either a

label
or textbox. Could you please advise how to format.

Thanks a bunch,

Martha
.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Userform format question

It doesn't like the "&" but wotrks with "="

oops... sorry.

I copied that out of something I have here... in my case,
I wanted it to append the time to the existing caption...
therefore the &

But for you, yep... =

Glad you got it working.

Mark


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Userform format question

yep, that was it.

I went into one of my applications to be reminded of the
exact positioning of the AM/PM part, and forgot to edit
the post appropriately.

Oops.

-----Original Message-----
I think you mean

lblTime.Caption = Format(Time, "hh:mm AM/PM")



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
Another Userform question. ingleg Excel Discussion (Misc queries) 1 July 6th 06 01:17 PM
Userform question David Goodall Excel Programming 5 May 12th 04 10:18 AM
Userform Question Ryan Excel Programming 2 April 30th 04 02:48 AM
userform question keyur Excel Programming 2 April 14th 04 04:49 PM
Userform question John Holland Excel Programming 2 October 28th 03 05:49 PM


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