Hi all!!
I did a seach for the like operator and could find this question asked before so here goes.....
I have a Function that takes a string (of an IP address) and uses the like operation to see if the format of the IP is correct,
Anyways, when I run this I get a type mismatch error 13. Now I have done something like this before and it did work, is there some glaring error that I'm overlooking?Code:Public Function IPSim(ByVal IPS As String) As Boolean
Dim Isit As Boolean
Isit = IPS Like "#.#.#.#" Or "#.#.#.##" Or "#.#.#.###" Or "#.#.##.#" Or "#.#.##.##" Or "#.#.##.###" Or _
"#.#.###.#" Or "#.#.###.##" Or "#.#.###.###" Or "#.##.#.#" Or "#.##.#.##" Or "#.##.#.###" Or "#.##.##.#" Or _
"#.##.##.##" Or "#.##.##.###" Or "#.##.###.#" Or "#.##.###.##" Or "#.##.###.###" Or "#.###.#.#" Or _
"#.###.#.##" Or "#.###.#.###" Or "#.###.##.#" Or "#.###.##.##" Or "#.###.##.###" Or "#.###.###.#" Or _
"#.###.###.##" Or "#.###.###.###" Or "##.#.#.#" Or "##.#.#.##" Or "##.#.#.###" Or "##.#.##.#" Or _
"##.#.##.##" Or "##.#.##.###" Or "##.#.###.#" Or "##.#.###.##" Or "##.#.###.###" Or "##.##.#.#" Or _
"##.##.#.##" Or "##.##.#.###" Or "##.##.##.#" Or "##.##.##.##" Or "##.##.##.###" Or "##.##.###.#" Or _
"##.##.###.##" Or "##.##.###.###" Or "##.###.#.#" Or "##.###.#.##" Or "##.###.#.###" Or "##.###.##.#" Or _
"##.###.##.##" Or "##.###.##.###" Or "##.###.###.#" Or "##.###.###.##" Or "##.###.###.###" Or "###.#.#.#" Or _
"###.#.#.##" Or "###.#.#.###" Or "##.#.##.#" Or "##.#.##.##" Or "###.#.##.###" Or "###.#.###.#" Or _
"###.#.###.##" Or "###.#.###.###" Or "###.##.#.#" Or "###.##.#.##" Or "###.##.#.###" Or "###.##.##.#" Or _
"###.##.##.##" Or "###.##.##.###" Or "###.##.###.#" Or "###.##.###.##" Or "###.##.###.###" Or _
"###.###.#.#" Or "###.###.#.##" Or "###.###.#.###" Or "###.###.##.#" Or "###.###.##.##" Or "###.###.##.###" Or _
"###.###.###.#" Or "###.###.###.##" Or "###.###.###.###"
If Isit = True Then...........
Thanks in advance!!
