Hi
I would like to use a button to paste a value into 2 textbox with a specific formatting.
Ex:
If i have copied to clipboard the value:
OrCode:46.57180476969694, -82.05882047395006
When i would click on the button, it would paste in TextBox1: 46.5718, and in TextBox2: -82.0588.Code:46.57180476969694; -82.05882047395006
So i only need 4 digits after decimal.
I've tried like below:
But that does not work at all.Code:Dim strTemp As String Dim strParts() As String On Error Resume Next strTemp = Clipboard.GetText 'Google Map strParts = Split(strTemp, ",") TextBox1.Text = Split(strParts(0), ".")(0) & "." & Left$(Split(strParts(0), ".")(1), 4) TextBox2.Text = Split(strParts(1), ".")(0) & "." & Left$(Split(strParts(1), ".")(1), 4) Return
How can i do that? Sometime i could have as a separator "," and other time ";".
In VB6, i used to use GoSub, but that does not work for VB.Net
Thank you.




Reply With Quote
