C
Charles May
I have a listview which checkboxes containing items to invoice. The Create
Invoice button (button1) is disabled unless there are items checked.
However, I had to use an if..then..else statement to make it work. My
question is, why can I not get it to work using an IIF statement?
In the mouseup event of the listview I tried the following methods to
achieve the result.
This doesn't work
IIF(Listview1.CheckedItems.Count > 0, Button1.Enabled = True,
Button1.Enabled = False)
This works
If Listview1.CheckedItems.Count > 0 Then
Button1.Enabled = True
Else
Button1.Enabled = False
End If
I'm just curious if I did something wrong trying to use IIF instead of
IF...THEN...ELSE
Thanks
Charlie
Invoice button (button1) is disabled unless there are items checked.
However, I had to use an if..then..else statement to make it work. My
question is, why can I not get it to work using an IIF statement?
In the mouseup event of the listview I tried the following methods to
achieve the result.
This doesn't work
IIF(Listview1.CheckedItems.Count > 0, Button1.Enabled = True,
Button1.Enabled = False)
This works
If Listview1.CheckedItems.Count > 0 Then
Button1.Enabled = True
Else
Button1.Enabled = False
End If
I'm just curious if I did something wrong trying to use IIF instead of
IF...THEN...ELSE
Thanks
Charlie