Click here to Skip to main content
15,887,946 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Copy .exe file to desktop Pin
dell-gl62m30-Nov-15 18:37
dell-gl62m30-Nov-15 18:37 
GeneralRe: Copy .exe file to desktop Pin
Richard Deeming30-Nov-15 23:17
mveRichard Deeming30-Nov-15 23:17 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak1-Dec-15 1:33
mveDave Kreskowiak1-Dec-15 1:33 
AnswerRe: Copy .exe file to desktop Pin
Amarnath S1-Dec-15 2:45
professionalAmarnath S1-Dec-15 2:45 
GeneralRe: Copy .exe file to desktop Pin
Dave Kreskowiak1-Dec-15 4:01
mveDave Kreskowiak1-Dec-15 4:01 
QuestionWhile return CMDIChildWndEx::DestroyWindow(); taking time Pin
Member 1189107024-Nov-15 18:25
Member 1189107024-Nov-15 18:25 
QuestionRe: While return CMDIChildWndEx::DestroyWindow(); taking time Pin
Richard MacCutchan24-Nov-15 21:56
mveRichard MacCutchan24-Nov-15 21:56 
QuestionD A Pin
JR21216-Nov-15 1:37
JR21216-Nov-15 1:37 
Hi,

I found this code on the internet. but now I want to know of a member is a group or a normal login. Someone has an idee how to find this info?

Jan
Set cmd = CreateObject("ADODB.Command")
Set cn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")

cn.Open "Provider=ADsDSOObject;"

cmd.CommandText = "SELECT adspath,cn from 'LDAP://" & getNC & _
              "' WHERE objectCategory = 'Group' and cn = '" & groupname & "'"

cmd.activeconnection = cn

Set rs = cmd.Execute

'
'**
' process the results of the query into our arrays for later
'**
'

i = 0
While rs.EOF <> True And rs.bof <> True
    grouppaths(i) = rs.fields("adspath").Value
    groupnames(i) = rs.fields("cn").Value
    rs.movenext
    i = i + 1
Wend

cn.Close

If i = 0 Then
    MsgBox "Nothing Found, Exiting"
    Exit Sub
End If

Application.StatusBar = "Records Found..." & i

'
'**
' Turn off updates and calculations
'**
'
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.DisplayStatusBar = True

'
'**
' found something so create the output files and write the headers
'**
'

Application.StatusBar = "Creating Worksheet headers..."

If i > 0 Then
    Set objsheet = Worksheets(blad)
    For h = 1 To 2 '1 To numheader2
        objsheet.Cells(1, h) = headers2(h)
        objsheet.Cells(1, h).Font.Bold = True
    Next
End If

'
'**
' now process each group found and extract all members
'**
'

cl = 1      'count lines
gl = 1      'group lines

Application.StatusBar = "Populating Worksheets..."

For j = 0 To i - 1
    Application.StatusBar = "Writing Group " & j & " of " & i

    Set objgroup = GetObject(grouppaths(j))

    cl = cl + 1
    groupname.Offset(, 1) = objgroup.Members.Count
    c = objgroup.Members.Count
    g = 0
    Set objsheet = Worksheets(blad)
    If objgroup.Members.Count > 0 Then
        For Each objmember In objgroup.Members
            g = g + 1
            Application.StatusBar = "Writing Group Details " & g & " of " & c

            gl = gl + 1
            objsheet.Cells(gl, 1).Value = groupnames(j)
            objsheet.Cells(gl, 2).Value = Right(objmember.name, Len(objmember.name) - 3)
            objsheet.Cells(gl, 3).Value = objmember.OperatingSystem
            objsheet.Cells(gl, 4).Value = objmember.distinguishedName
        Next
    Else
        gl = gl + 1
        objsheet.Cells(gl, 1).Value = groupnames(j)
        For h = 2 To 2 'numheader2
            objsheet.Cells(gl, h) = NoEntry
        Next
    End If
Next

AnswerRe: D A Pin
Dave Kreskowiak16-Nov-15 8:13
mveDave Kreskowiak16-Nov-15 8:13 
GeneralRe: D A Pin
JR21216-Nov-15 20:47
JR21216-Nov-15 20:47 
Questionlogon script with .vbs format to open a picture file. Pin
Member 1214145115-Nov-15 11:51
Member 1214145115-Nov-15 11:51 
AnswerRe: logon script with .vbs format to open a picture file. Pin
Richard MacCutchan15-Nov-15 21:06
mveRichard MacCutchan15-Nov-15 21:06 
QuestionVB.NET library for Excel Pin
BobbyStrain14-Nov-15 14:42
BobbyStrain14-Nov-15 14:42 
AnswerRe: VB.NET library for Excel Pin
CHill6012-Dec-15 4:17
mveCHill6012-Dec-15 4:17 
QuestionShopping cart Pin
Member 1213890914-Nov-15 5:53
Member 1213890914-Nov-15 5:53 
AnswerRe: Shopping cart Pin
Wombaticus14-Nov-15 7:02
Wombaticus14-Nov-15 7:02 
AnswerRe: Shopping cart Pin
Richard Andrew x6414-Nov-15 7:40
professionalRichard Andrew x6414-Nov-15 7:40 
GeneralRe: Shopping cart Pin
Eddy Vluggen14-Nov-15 9:54
professionalEddy Vluggen14-Nov-15 9:54 
QuestionModelling Analysis using VB.net Pin
x_mark the spot13-Nov-15 0:01
x_mark the spot13-Nov-15 0:01 
AnswerRe: Modelling Analysis using VB.net Pin
Afzaal Ahmad Zeeshan13-Nov-15 0:13
professionalAfzaal Ahmad Zeeshan13-Nov-15 0:13 
AnswerRe: Modelling Analysis using VB.net Pin
Simon_Whale13-Nov-15 0:34
Simon_Whale13-Nov-15 0:34 
GeneralRe: Modelling Analysis using VB.net Pin
x_mark the spot15-Nov-15 16:49
x_mark the spot15-Nov-15 16:49 
GeneralRe: Modelling Analysis using VB.net Pin
Dave Kreskowiak15-Nov-15 16:59
mveDave Kreskowiak15-Nov-15 16:59 
GeneralRe: Modelling Analysis using VB.net Pin
x_mark the spot15-Nov-15 17:34
x_mark the spot15-Nov-15 17:34 
GeneralRe: Modelling Analysis using VB.net Pin
Dave Kreskowiak16-Nov-15 3:58
mveDave Kreskowiak16-Nov-15 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.