ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Long with value zero - IGNORE (https://www.excelbanter.com/excel-programming/426991-re-long-value-zero-ignore.html)

Risky Dave

Long with value zero - IGNORE
 
Please ignore this posting - I was being thick - now worked it out (and
wasn't it easy!)

"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





All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com