I know I have a problem with
IPROUTER = (Left(IP, 11)) & ((Right(IP, 3)) + 5)
Im new at vba , how i should write this line to not get titled error?
'''VBA
Dim ID As String
Dim IP As String
Dim IPROUTER As String
ID = Mid(olItem.Subject, 20, 9)
IP = Right(olItem.Body, 14)
IPROUTER = (Left(IP, 11)) & ((Right(IP, 3)) + 5)
With objFile
.WriteLine "START " & Chr(34) & ID & Chr(34) & " ping" & IP & " -t"
'''
Thanks for the reply. It didn't help but I figured it out in a diffrent way. I just convert string to int. Code of my example below:
Dim ID As String
Dim IP As String
Dim IPROUTER As String
Dim ok As String
Dim okI As Integer
ID = Mid(olItem.Subject, 20, 9)
IP = Right(olItem.Body, 14)
IPROUTER = (Left(IP, 12))
ok = Mid(IP, 13, 3)
okI = CInt(ok)
With objFile
.WriteLine "START " & Chr(34) & ID & Chr(34) & " ping " & IP & " -t"
.WriteLine "START " & Chr(34) & ID & Chr(34) & " ping " & IPROUTER & okI + 5 & " -t"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments