LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Time format in userform textbox

Hi all,

I thought this would be an easy solve but it has me baffled. I've read
quite a few old posts and still haven't a solution so would appreciate
any help.

I have a textbox on a userform I am trying to set to a time format.
(The textbox is bound to a ws cell and this is set to time format)

I have tried all of the below;

UserForm5.Controls("TextBox" & i).Text = Format$(ws.Range("g" & K),
"Short Time")
UserForm5.Controls("TextBox" & i).Text = Format$(ws.Range("g" & K),
"h:mm")
UserForm5.Controls("TextBox" & i).Text = Format$
(sheets("sheet4").range("g" & K), "H:mm")
UserForm5.Controls("TextBox" & i).Text = Format(ws.Range("g" & K),
"Short Time")
UserForm5.Controls("TextBox" & i).Text = Format(ws.Range("g" & K),
"h:mm")
UserForm5.Controls("TextBox" & i).Text =
Format(sheets("sheet4").range("g" & K), "H:mm")


None of which have worked - the time still shows as a decimal. I'd
appreciate any pointers as i'm baffled and getting very frustrated!
 
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
Format TextBox on UserForm ryguy7272 Excel Programming 7 August 5th 07 03:46 PM
Format a Userform textbox to Military time Christy Excel Programming 2 August 24th 05 10:15 PM
TextBox in UserForm with 24h time format Mika Excel Programming 1 February 1st 05 07:45 PM
format textbox in userform jeffP Excel Programming 1 January 25th 05 01:10 AM
Format of a TextBox in a userform MD Excel Programming 4 January 13th 05 05:42 PM


All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"