• How to get Copied range address(marching ant range) in VBA

    From Md Mohashin Bhyian@21:1/5 to All on Fri Oct 28 05:33:51 2022
    My dear coders, I was struggling to get copied range. I really need your help and this will reduce my work a lot. Please kindly suggest.

    Background
    Let's say I copy a range. In Excel, Copied Range will be highlighted with a dashed border. Then I just select another cell. Now I will run a macro. After running the macro, in messageBox, I want to see the address of the Copied range.

    Example:
    1. Copied Range("$A$1:$A$5") and select B1Cell. When I will run the macro, messageBox will show $A$1:$A$5.
    2. Copied Range("$C$5:$E$10") and select B1Cell. When I will run the macro, messageBox will show $C$5:$E$10.

    I am not very much an expert in windows API. So I really need your kind help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)