I am using Excel 2003. I am trying to importing a 20 character from a barcode scanner to cell K2 in an Excel spreadsheet. When the part is scanned, the program handling the scanner data shows the data as being 12345678901234567890 . I am running a macro that retrieves that data and places it in cell K2. The number that appears in cell K2 is 12345678901234500000 . The macro module code reads:
Code
Sub GetSWData()
Dim WedgeData As Variant
Dim MyPort As String
Dim Chan As Long
Dim StringVar As String
Dim DataIn As Double
MyPort = "COM1"
Application.DisplayAlerts = False
Chan = DDEInitiate("WinWedge", MyPort)
WedgeData = DDERequest(Chan, "Field(1)")
DataIn = WedgeData(1)
Range("K2").Value = WedgeData(1)
DDETerminate Chan
End Sub
Display More
I am guessing that one of the Dim statements has the wrong word after As but nothing I have tried gets me past this point. I am not above offering a bribe for an answer!