ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding OR conditions to IF-Then statement (https://www.excelbanter.com/excel-programming/351478-adding-conditions-if-then-statement.html)

excelnut1954

Adding OR conditions to IF-Then statement
 
Not getting the syntax right on this.....

Trying to capture results of either 0 or if the textbox is left
blank.There is an Else statement after all this, but that part is ok.

If TextBox6 < 1 Or "" Then

This line highlights when the macro is run. I tried putting () in the
statement, but obviously still don't have it right.

Thanks,
J.O.


Toppers

Adding OR conditions to IF-Then statement
 
If textbox6.value=0 or textbox6.value="" then

Alternatively:

IF application.or(textbox6.value=0,textbox6.value="") then

"excelnut1954" wrote:

Not getting the syntax right on this.....

Trying to capture results of either 0 or if the textbox is left
blank.There is an Else statement after all this, but that part is ok.

If TextBox6 < 1 Or "" Then

This line highlights when the macro is run. I tried putting () in the
statement, but obviously still don't have it right.

Thanks,
J.O.



excelnut1954

Adding OR conditions to IF-Then statement
 
Thanks Toppers!
So simple, yet so elusive.
J.O.



All times are GMT +1. The time now is 03:06 AM.

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