Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Time error in user form


Hi
I have a user form with text boxes, one that gives a value of the
active cell contents of a time in a diary worksheet. These cells are
custom formated has hh:mm

The user form text box code is:
Private Sub txttime_Change()
txttime.Value = Format(txttime.Value, "hh:mm")
End Sub

This works well, for all times except 12:00.
When you activate a cell at 12:00 the text box reads 00:05 yet in all
other times its ok?
Any ideas whats wrong I have tried various forms of formatting.
Bern


--
bern
------------------------------------------------------------------------
bern's Profile: http://www.excelforum.com/member.php...o&userid=20169
View this thread: http://www.excelforum.com/showthread...hreadid=468943

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Time error in user form


Hi
I have managed to work it out myself, so for anybody with simila
problem:

I formated the time cells to text and entered ie 12:00
and entered a change event in the user form text box:

Private Sub txttime_Change()
txttime.Value = Format(ActiveCell.Value, "hh:mm")
End Sub
now all the times read as they should.
cheers
Ber

--
ber
-----------------------------------------------------------------------
bern's Profile: http://www.excelforum.com/member.php...fo&userid=2016
View this thread: http://www.excelforum.com/showthread.php?threadid=46894

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
User form error when opened theguz Excel Programming 3 October 24th 05 01:09 PM
User Form Error theguz[_5_] Excel Programming 3 August 16th 05 07:58 PM
User Form Error theguz Excel Discussion (Misc queries) 3 August 15th 05 10:49 PM
Run Time Error 424 Combo Box User Form Jennifer Excel Programming 3 April 7th 05 08:23 PM


All times are GMT +1. The time now is 12:36 PM.

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"