I have the following code..... 

```
private sub textbox1_change()
if textbox1.value = "" then exit sub 
if textbox2.value = "" then exit sub 
textbox3.value = cdbl(textbox1.value) / cdbl(textbox2.value)
end sub 
private sub textbox2_change()
if textbox1.value = "" then exit sub
if textbox2.value = "" then exit sub
textbox3.value = cdbl(textbox1.value) / cdbl(textbox2.value)
end sub 

```

Whenever textbox2 has a zero value there will be a message box prompting runtime error 11; division by zero. I tried to resolve it by using IIF condition as suggested by the user **Scott Craner** [here](https://stackoverflow.com/questions/38231638/how-to-solve-runtime-error-6-in-vba)

```
textbox3.value = cdbl(textbox1.value)/IIF(cdbl(textbox2.value) = 0 , 1 , cdbl(textbox2.value) ) 

```

I want to know if I can somehow assign the value of textbox3 as "NULL" or "NA" or "-" if the denominator is zero. I could not find anything credible on the internet. 

Thanks a lot !!