Hi Lennart,

Nice to see an other Dutch guy here.

A small rewrite of your code is below. The brackets at the If statements are not needed and GoTo's are considered very old school and should be avoided like the plaque \:\)

 Code:
;$octet1      = octet 1 of the ipaddress 
;$octet2      = octet 2 of the ipaddress 
;$octet3      = octet 3 of the ipaddress 
;$octet4      = octet 4 of the ipaddress 
;$ipadr         = ipaddress without spaces

;Ip-address opsplitsen voor eenvoudiger gebruik 
$octet1 = LTrim(SubStr(@IPADDRESS0, 1, 3)) ; Start positie 1ste octet en lengte 
$octet2 = LTrim(SubStr(@IPADDRESS0, 5, 3)) ; Start positie 2de octet en lengte
$octet3 = LTrim(SubStr(@IPADDRESS0, 9, 3)) ; Start positie 3de octet en lengte
$octet4 = LTrim(SubStr(@IPADDRESS0, 13, 3)) ; Start positie 4de octet en lengte
$IPADR = "$octet1.$octet2.$octet3.$octet4" ; weergave

;Zoeken in welk subnet de pc zit...
Select
	Case $octet2 = "18"
		Call $netlogon+"\printer.kix"
	Case $octet3 = "46"
		Call $netlogon+"\login.kix"
	Case $octet3 = "151"
		Call $netlogon+"\Elogin.kix"
EndSelect
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.