dim list ,PrimDomainContr Dim objXL Set objXL = WScript.CreateObject("Excel.Application") Dim objSubFolder Dim intZeile 'Excel-Konstanten Const xl3DPie = -4102 Const xlColumns = 2 Const xlLocationAsNewSheet = 1 Const xlColorIndexNone = -4142 Const xlLineStyleNone = -4142 Const xlDataLabelsShowValue = 2 '############################################################################ DomainString= Inputbox("Bitte Domain-Name eingeben") UserString = Inputbox ("Bitte NT-Account eingeben") Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString &"") With objXL .Visible = True .WorkBooks.Add .activesheet.cells(1,1).Value = "Computer-Name" .ActiveSheet.Cells(1,2).Value = DomainString .ActiveSheet.Cells(1,3).Value = "Gruppenmitgliedschaften von " & UserString .activesheet.Range("A1:C1").Name="Titelzeile" .activesheet.Range("A1:C1").Interior.Color=65535 .activesheet.Range("A1:C1").Font.Name="Arial Narrow" .activesheet.Range("A1:C1").Font.Size=16 .activesheet.Range("A1:C1").Font.Fontstyle="Bold" intZeile = 3 For Each GroupObj In UserObj.Groups .ActiveSheet.Cells(intZeile, 3).Value = ""& GroupObj.Name intZeile = intZeile + 1 Next .activesheet.Columns("A:G").EntireColumn.AutoFit end with