mikewood1980
Registered User.
- Local time
- Today, 16:30
- Joined
- May 14, 2008
- Messages
- 45
Hi
I've got a small problem with the parsing data using the split() function. The code below functions when the "PasteClipBoard" button is pressed. The code pastes the results in the box and uses the split function to put each value into 22.2, 32.1 etc into each field of the array "arrResultsData".
This works fine with data pasted from a column in an excel document, but when pasting from NorBuild (software where we need to get the data from) I get the following result:
As you can see there is a strange [?] value in the text box when i paste so the string cannot be split using vbCrLf as the delimiter.
Does anyone have any idea as to what I can use as an alternative delimiter?
Thanks in advance for your help
Mike Wood
I've got a small problem with the parsing data using the split() function. The code below functions when the "PasteClipBoard" button is pressed. The code pastes the results in the box and uses the split function to put each value into 22.2, 32.1 etc into each field of the array "arrResultsData".
Code:
Private Sub txtPasteClipboard_Click()
Dim test As String
Dim arrResultsData As Variant
Dim chrCurrentResult As String
' set the focus on the text box
txtResults.SetFocus
' paste the clipboard contents
DoCmd.RunCommand acCmdPaste
' commit the paste
DoCmd.RunCommand acCmdSaveRecord
' splits the text into a one-dimensional array
test = Split(txtResults, vbCrLf)(0)
MsgBox (test)
End Sub
This works fine with data pasted from a column in an excel document, but when pasting from NorBuild (software where we need to get the data from) I get the following result:
As you can see there is a strange [?] value in the text box when i paste so the string cannot be split using vbCrLf as the delimiter.
Does anyone have any idea as to what I can use as an alternative delimiter?
Thanks in advance for your help
Mike Wood