Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
complication between VB syntax and Object Value with [-] minus character
I'm trying to fetch data from "Active Directory",
the process are : strQuery = "SELECT AdsPath FROM 'LDAP://ou=xxx,ou=yyy,ou=zzz,dc=ct,dc=abcdefg,dc=net'" objCommand.CommandText = strQuery Set objRecordSet = objCommand.Execute Set objUser = GetObject(objRecordSet.Fields("AdsPath").Value) Do Until objRecordSet.EOF formMain.lbstatus.Caption = "Fetching data " & i - 4 & " of " & objRecordSet.RecordCount formMain.Repaint Set objUser = GetObject(objRecordSet.Fields("AdsPath").Value) ThisWorkbook.ActiveSheet.Cells(i, 3).Value = objUser.cn ' NICK USER NAME ThisWorkbook.ActiveSheet.Cells(i, 4).Value = objUser.displayName'LOGIN NAME ThisWorkbook.ActiveSheet.Cells(i, 5).Value = objUser.sn 'LAST NAME ThisWorkbook.ActiveSheet.Cells(i, 6).Value = objUser.Title 'TITTLE ThisWorkbook.ActiveSheet.Cells(i, 7).Value = objUser.mail ' EMAIL Address ThisWorkbook.ActiveSheet.Cells(i, 8).Value = objUser.msExchIMAddress' im MAIL Address ThisWorkbook.ActiveSheet.Cells(i, 9).Value = objUser.cvx-SourcingCompany 'SourcingCompany objRecordSet.MoveNext i = i + 1 Loop The problem happen when I'm trying to fetch cvx-SourcingCompany, it's seems like complication between VB syntax and Object Value when using character "-" that VB think objectUser.cvx [minus] SourcingCompany. Any Suggestion ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Plus or minus character ...Its ASCII value | New Users to Excel | |||
vba syntax for excel object | Excel Discussion (Misc queries) | |||
Drop Down List complication | Excel Discussion (Misc queries) | |||
Object syntax with a Period ( . ) | Excel Programming | |||
Drop dow list complication | Excel Discussion (Misc queries) |