I think the problem is with "1" vs 1 (SOH)

[HTML]My PBP Code for sender
Code:

main:
SEROUT led5,12,["9999",1]
PAUSE 100
SEROUT led5,12,["9999",5]
PAUSE 100
GOTO main

With this PBP Code it works regarding Pic to Pic communication.
But if I send "99991" or "99995" by my Visual Basic programm it does not work. [/HTML]

Your pic is sending out hex 1 and your vb is sending out hex 31
To get vb to send out a 1 try
txtDatatoSend.txt = "9999" & chr(1)
this will add a 1 to it, though if you ever want to send 0 it will actually be sending nul characters

On the other hand you could send a "1" and on the pic side once you receive your dat variable, just subtract "0" from it to give you the value you want or change your if statements to check for "1"