Combined Melee Attack and Melee Range

Does a model have to be in melee range with a weapon to sacrifice it for a combined melee attack, or only in their melee range in general?

For example, a unit of Karax move into range of a Stryker, each Karax at 2" melee. The controlling player chooses to make a 2 man combined melee attack with two Karax, one using his spear as the primary attack, the other giving up it’s shield for it. The text of CMA says that you only need to be able “to declare a melee attack against the target” and “have the intended target in melee range”. And melee range is defined as the range of the longest reach weapon the model has.

Would this be legal?

I’d love to know the answer for this too.

To combine an attack the weapon in question must be available to be used

So for the example above you’d have to use the spear for both those models