What am I missing?

Does this mean I have to wait for replication to complete? [Smile]

{Edit - Completed code}

code:
 ; ListGroupMembership.kix
BREAK ON
CLS
$cfilename = "H:\groupchange\BC.xls"

$oxl = Createobject("Excel.application")
$rc = $oxl.workbooks.open($cfilename)
$nrow = 1 ; -- Assume Row one is column Headings
WHILE $oxl.cells($nrow, 1).value <> "" ; -- If this is not NULL, keep going
$adsgroup = ""
$userobj = ""
$nrow = $nrow + 1 ; -- Data Starts on row two and add 1 each time
IF $oxl.cells($nrow, 1).value = ""
?"Script is Complete"
SLEEP 4
$oxl.quit
$oxl = ""
RETURN
ENDIF
; -- Get the value of the first field
$value1 = $oxl.cells($nrow, 1).value
?$value1
$domainstring="DOMAIN"
$userstring = $value1

$userobj = GetObject("WinNT://" + $domainstring + "/" + $userstring)

$group = "MMC OR BC"
;$grouppath = $domainstring + "/" + $group
$grouppath = $domainstring + "/" + $group
$adsgroup = GetObject("WinNT://" + $grouppath)
$adsgroup.add("WinNT://" + $domainstring + "/" + $userstring)
$adsgroup.setinfo
;SLEEP 1
IF @Serror <> 0
?@Serror
ENDIF
LOOP
?"Script is complete"
get $

Thanks,

Kent

[ 27. November 2002, 22:22: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's