I wrote this for my new bot, and I find that it works very well. It's influenced by Adron's RequiredDelay(), but with that I got rediculous delay times (like 3 days) for 4 byte messages. Anyways, here it is:
Public Function GetDelay(strMessage As String) As Long
Static LastTick As Long
Const DelayPerByte As Long = 10
Dim Tick As Long
Dim Bytes As Long
Dim Delay As Long
Bytes = Len(strMessage) + 1
Tick = GetTickCount()
If LastTick = 0 Then LastTick = Tick 'the first time the function is called it's 0
Delay = LastTick - Tick
While Delay < 0
Delay = Delay + (Bytes * DelayPerByte) * 200
Wend
Delay = Delay + 1 'sometimes it's 0, and that disables timers
LastTick = Tick
GetDelay = Delay
End Function