Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Long with value zero

Use the below condition...

If Clng("0" & Trim(Textbox1.value)) < 0 Then
''''
End If

If this post helps click Yes
---------------
Jacob Skaria


"Risky Dave" wrote:

Hi,

I have a form that captures user inputted values to text boxes and formats
them as numbers ("#,###,###"). These values are converted to numbers (using
CLng) and added in a Long variable. This bit works.

What I can't figure out is how to handle boxes that are not filled out -
which is an acceptable option for my users.

I have tried using an If statement to manually enter the value 0 (zero) if
the text box is empty (""), but the formatting just ignores it and keeps the
content blank (I have checked this by using a message box to display the
value held).

Can anyone suggest how I can convert a blank to a zero (this information is
stored elsewhere in the workbook as well so I would like to be able to
manipulate these as zero) in these circumstances?

Many thanks.

Dave



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
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo Max Loger Excel Discussion (Misc queries) 0 June 14th 11 04:30 PM
Long Long Long Nested If Function sed Excel Discussion (Misc queries) 4 December 9th 09 06:44 PM
Interrupting long calculations in Excel? Hi all, I am having a verylong calculation in Excel using VBA. Of course I know I can hit ESC orCTRL+BREAK to interrupt the VBA program. But I found due to too long runningprocess, the Excel window stop to LunaMoon Excel Discussion (Misc queries) 3 July 31st 08 04:47 PM
Clearing cells takes long, long time unclemuffin Excel Discussion (Misc queries) 9 August 17th 07 02:22 AM
Clearcontents takes long, long, time Fid[_2_] Excel Programming 3 August 15th 07 12:40 AM


All times are GMT +1. The time now is 05:20 AM.

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"