Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default TextBox and Time

Hi All,

How we can restrict only time with ten minutes interval are entered
into a text box?
Is it possible to acheive this using mode function?

i want only 0.0,0.1,0.2,0.3,0.4,0.5,1.0,1.1,1.2, etc to be entered in
the text box

TIA
Soniya

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default TextBox and Time

maybe you could use a combobox with a dropdown pointing to the rowsource
with your data. also, maybe you could use data validation in the cell the
textbox was going to fill.

just some thoughts, didn't test anything
--


Gary


"Soniya" wrote in message
ups.com...
Hi All,

How we can restrict only time with ten minutes interval are entered
into a text box?
Is it possible to acheive this using mode function?

i want only 0.0,0.1,0.2,0.3,0.4,0.5,1.0,1.1,1.2, etc to be entered in
the text box

TIA
Soniya



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default TextBox and Time


Soniya,

If the idea is to limit your inputs to one decimal place only for
values below the multiples of 0.5 ie effectively for 0.0 to 0.5; 1.1
to 1.5; 2.1 to 2.5 etc. then you can try:

If Application.Round(TextBox1.Value,1)
-Int(Application.Round(TextBox1.Value,1)) <=0.5 Then
Application.Round(TextBox1.Value,1)

And if you desire to have values above 0.5 to be rounded up, institute
the above with a qualification as below:

If Application.Round(TextBox1.Value,1)
-Int(Application.Round(TextBox1.Value,1)) <=0.5 Then
Application.Round(TextBox1.Value,1) *Else
Application.RoundUP(TextBox1.Value,1)*

Myles.


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=490373

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
format textbox to time ASU Excel Discussion (Misc queries) 3 June 7th 06 10:05 PM
Format a Userform textbox to Military time Christy Excel Programming 2 August 24th 05 10:15 PM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Format As TIME In A TextBox Minitman[_4_] Excel Programming 4 February 9th 05 12:55 AM
TextBox in UserForm with 24h time format Mika Excel Programming 1 February 1st 05 07:45 PM


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