Help with my macro

Joined
Jan 21, 2008
Messages
2
Reaction score
0
Im creating a macro but my problem here is that i cant add series of number after the reference. can you pls help me

e.g.

from ROD12345678 should be ROD12345678-01


With Session


REFERENCE = .GetDisplayText(4, 39, 3) & .GetDisplayText(4, 45, 6)

Do While Not Len(Trim(.GetDisplayText(10, 79, 1))) = 0

For i = 10 To 20
If Len(Trim(.GetDisplayText(i, 79, 1))) = 0 Then
GoTo CDONE

Else

If .GetDisplayText(i, 79, 1) = "E" Then
RELATION = LTrim(.GetDisplayText(i, 21, 10))
AMOUNT = .GetDisplayText(i, 64, 13)

REFF = REFERENCE & RELATION & AMOUNT
Write #3, REFF
Else
GoTo CREFRESH
End If

End If
CREFRESH:
Next i

Loop
CDONE:
.TransmitTerminalKey rcIBMF3Key
.WaitForEvent rcEnterPos, "30", "0", 3, 17
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcEnterPos, "30", "0", 3, 17
.TransmitTerminalKey rcIBMF3Key
.WaitForEvent rcEnterPos, "30", "0", 21, 7

Close #3

End With
End Sub
 
can anyone please help me with my visual basic ..


how to put series of number

for example.

ROD1235678


TO

ROD1235678-01

Please
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top