Something Missing


Posted by Richard Baur on January 25, 2001 8:06 AM

I am scanning in a 125 digit number\letter. I want to enter 5 12-digit numbers say in cell a15 - a19. The first number is at digit 14 and has a length of 12. The second number is at digit 39 and has a length of 12. The third number is at digit 64 and has a length of 12. The fourth number is at digit 89 and has a length of 12. The fifth number is at digit 114 and has a length of 12. I am getting FALSE values retuned when i enter the number into the input box. Here is my code.

Sub BUBBLE()

Do
Application.OnKey "b", "BUBBLE"
Dim EBUBBLE As String
EBUBBLE = Application.InputBox("Enter the IMEI", , , , , , 1 + 2)

If EBUBBLE = "" Then Exit Sub
ActiveCell.Value = EBUBBLE = Left(14, 12)
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveCell.Value = EBUBBLE = Left(39, 12)
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveCell.Value = EBUBBLE = Left(64, 12)
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveCell.Value = EBUBBLE = Left(89, 12)
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveCell.Value = EBUBBLE = Left(114, 12)
ActiveCell.Offset(1, 0).Range("a1").Select

Loop
End Sub

*** Must have input box ***

Any help woulb be appreciated



Posted by cpod on January 25, 2001 9:26 AM


Try using the mid function:

ActiveCell.Value = mid(EBUBBLE,14, 12)