Hi all I am having a problem with Parse data error message when entering data manually or scanned into a user form. If I paste the same data from the clipboard it works fine. But if I try to manually enter it or scan it, I get the run time error 1004, "No Data Was Selected To Parse". It scans the data letter and digits precisely but it will not work, unless its coming from the spreadsheet/clipboard. I know its looking at selection, im sure that's where the problem lies I just dont have the know how, the macro was recorded Here is the code:
Private Sub CommandButton1_Click()
Selection.TextToColumns Destination:=Range("L2:M2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 9), Array(4, 9)), _
TrailingMinusNumbers:=True
End Sub
my raw data looks like this: ELRTY10-8888753-prf-16095
Ultimately in cell L2 "ELRTY10" and "8888753" in cell M2
that's the reason for the text to columns to erase the rest not needed. Again Clipboard Ctrl V works but manually or scanning into the user form text box gives the error.
Bookmarks