Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Userform Initialization

Patrick,

Try this

TextBox1.Text = Format(rng(1,47).Value, "hh:mm")
TextBox2.Text = Format(rng(1,48.Value, "hh:mm")

--

HTH

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

"Patrick Simonds" wrote in message
...
I use the following code to enter data in a Userform, if the data already
exists on the spreadsheet. Everything works great, unless the time is

12:00
(using 24 hour time) then it displays on the Userform as 00:05, even

though
it is displayed correctly on the spreadsheet.


'Places data in the userform text boxes if it exists on the spreadsheet

TextBox1.Text = rng(1, 47).Value
TextBox1.Text = Format(TextBox1.Text, "hh:mm")
TextBox2.Text = rng(1, 48).Value
TextBox2.Text = Format(TextBox2.Text, "hh:mm")




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
Annoying prompt: ActiveX and app initialization Tom Urtis Excel Programming 3 January 22nd 05 01:15 AM
ShowDataForm Initialization Alan Excel Programming 2 February 11th 04 11:24 PM
User Form Initialization Josh[_7_] Excel Programming 1 November 5th 03 07:35 PM
List box initialization Tom Ogilvy Excel Programming 0 July 15th 03 05:41 PM
List box initialization Daniel Thompson Excel Programming 0 July 15th 03 05:17 PM


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