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: 60
Default iserror(Timevalue())

Hiya,

I have a form with a textbox in it.
I want the user to either enter 'TBA' or a valid time.

I have put the following code together but need to make an amendment to get
it work:

If UCase(txttime) = "TBA" Or Not IsError(TimeValue(txttime)) Then
txttime = UCase(txttime)
Else
lblerrtime.Visible = True
End If

An error and halt in code only arises if the textbox contains something that
cannot be converted to a time.
Could it be because "The IsError function is used to determine if a NUMERIC
expression represents an error" - as it says in helpfile?

Any ideas what I can do? I'd rather not go down the VBA error handling route
as there are loads of textboxes I have to deal with (each resulting in
different outcomes).

Many thanks for any thought,

Basil
 
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
timevalue function busterpace Excel Worksheet Functions 2 October 8th 06 03:39 AM
TimeValue formula Phrank Excel Worksheet Functions 2 September 20th 06 10:27 AM
Calculation to subtract TimeValue from Now() Value Trying to excel in life but need help Excel Worksheet Functions 1 April 7th 05 09:51 PM
DATEVALUE and TIMEVALUE Carl Hartness Excel Programming 1 May 26th 04 05:14 PM
Need Help with Code - TimeValue Donnie Stone Excel Programming 1 October 4th 03 04:14 PM


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