Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following list boxes:
I need to run a macro in QV on condition that a user makes a selection in any of the above two list boxes. I have the following individual macros which work individually:
How can these two be combined to achieve my objective?
Regards.
Chris
Set fld and fld2 as you have already and then...
IF (fld.GetValueCount(1) * fld2.GetValueCount(1)) = 0 then
msgbox "Please select....
If either or both are zero then the result of multiplying becomes zero.
If you only want to do the message when one is selected and the other not,...
IF (fld.GetValueCount(1) * fld2.GetValueCount(1)) = 0 AND _
(fld.GetValueCount(1) + fld2.GetValueCount(1)) <> 0 then
msgbox "Please select....
...that second bit prevents the message when both are unselected.
Set fld and fld2 as you have already and then...
IF (fld.GetValueCount(1) * fld2.GetValueCount(1)) = 0 then
msgbox "Please select....
If either or both are zero then the result of multiplying becomes zero.
If you only want to do the message when one is selected and the other not,...
IF (fld.GetValueCount(1) * fld2.GetValueCount(1)) = 0 AND _
(fld.GetValueCount(1) + fld2.GetValueCount(1)) <> 0 then
msgbox "Please select....
...that second bit prevents the message when both are unselected.
Ended up using two different sheets and two different macros.
Regards
Many thanks Mark, this works fine