Link to home
Start Free TrialLog in
Avatar of Wilder1626
Wilder1626Flag for Canada

asked on

VB6 - Split clipboard value into 2 Textbox with delimiter character

Hi

I need your help on a macro. I copy from a website a latitude / longitude in this format: "47.123456;-79.987654"

What i'm trying to do is to paste the latitude in the Latitude Textbox and the Longitude in the Longitude Texbox.

So the delimiter will be: ";". The reason is that the number of digits after the decimal can vary.

So in Longitude Textbox, i will have: "47.123456"
In Longitude Textbox i will have: "-79.987654"

User generated image
Then, the final touch will be to only keep the 4 last digits after decimal in each textbox. The value cannot be rounded. It must keep the exact same 4 digits after decimal.

I'm adding a project sample where you can copy to clipboard a latitude and longitude. Then when you click on Paste Latitude and Longitude, it should update the proper Textbox.

How can i do that?

Thank you for your help.
VB6-Copy-Paste.zip
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wilder1626

ASKER

Thank's again, this is exactly what i needed.
You're welcome. Do you need an explanation of the code?
I was able to tweak it already for another thing i wanted to do. I was able to understand it. Thanks again.