First select the target when you want to shoot.
"When a unit shoots, you must select the target unit(s) for all of the ranged
weapons its models are making attacks with before any attacks are resolved."
So, this step and rule above is enough to indicate that you will so all measuring and declaring before resolution. Further supported here:
"In either case, when you select a target unit you must
declare which weapons will target that unit before any attacks are resolved."
"Only enemy units can be chosen as the target for an attack. In order to target
an enemy unit, at least one model in that unit must be within range (i.e. within
the distance of the Range characteristic) of the weapon being used and be
visible to the shooting model."
Then for more info:
"If your unit is shooting more than one ranged weapon at a target, and those
weapons have different characteristics profiles, then after you have resolved
attacks with one of those weapons you must, if any other weapons with the
same characteristics profile are also being shot at that unit, resolve those
attacks before resolving any attacks against the target unit with a weapon that
has a different characteristics profile."
Remember, this is for resolution- not measuring of range and choosing targets which comes before any resolution.
So, to answer the OP - yeah, you're fine. You declare and assign what weapons go where before resolution.