Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform Textbox - Date Problem


Hello All,

Im currently trying to "Validate" a user form that Ive used before bu
had problems.

Its part of a Clocking-In process that measures time spent at work.
The users of the form are asked how many hours they worked.

At the moment the validation checks whether the Textbox contains
number or not (using IsNumeric) though there is nothing that stops a
entry of 38:30:00, or similar, which causes me plenty of headache
later on.

Is there any way I can validate the TextBox to ensure that numbers ar
entered in the format - 38.50 (TensUnits.TenthsHundreths)?

If it makes any difference, the Userform doesnt paste to the Workshee
until a button is pressed

Many thanks in advance,

Eddi

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Userform Textbox - Date Problem

IsNumeric would be false for 10:30 and true for 10.5

If you use the textbox's Exit method to test for this you
can use

Cancel = NOT(Isnumeric(textbox1))or an IF statement to
display some message.

Patrick Molloy
Microsoft Excel MVP

-----Original Message-----

Hello All,

Im currently trying to "Validate" a user form that Ive

used before but
had problems.

Its part of a Clocking-In process that measures time

spent at work.
The users of the form are asked how many hours they

worked.

At the moment the validation checks whether the Textbox

contains a
number or not (using IsNumeric) though there is nothing

that stops an
entry of 38:30:00, or similar, which causes me plenty of

headaches
later on.

Is there any way I can validate the TextBox to ensure

that numbers are
entered in the format - 38.50

(TensUnits.TenthsHundreths)?

If it makes any difference, the Userform doesnt paste to

the Worksheet
until a button is pressed

Many thanks in advance,

Eddie


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Userform Textbox - Date Problem

Is there a MaskEdit textbox addin in VBA?


"universal" wrote in message
...

Hello All,

Im currently trying to "Validate" a user form that Ive used before but
had problems.

Its part of a Clocking-In process that measures time spent at work.
The users of the form are asked how many hours they worked.

At the moment the validation checks whether the Textbox contains a
number or not (using IsNumeric) though there is nothing that stops an
entry of 38:30:00, or similar, which causes me plenty of headaches
later on.

Is there any way I can validate the TextBox to ensure that numbers are
entered in the format - 38.50 (TensUnits.TenthsHundreths)?

If it makes any difference, the Userform doesnt paste to the Worksheet
until a button is pressed

Many thanks in advance,

Eddie


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



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
Date Format for Userform TextBox John Calder New Users to Excel 4 July 29th 09 10:19 PM
Need A date Mask format for a Textbox on UserForm [email protected] Excel Discussion (Misc queries) 2 November 4th 07 02:27 AM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM
Help with Syntax UserForm TextBox John Wilson Excel Programming 1 July 28th 03 04:15 PM


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