Click here to Skip to main content
16,007,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to assign case to the event handler ? Pin
liv2luv13-Oct-07 1:59
liv2luv13-Oct-07 1:59 
AnswerRe: How to assign case to the event handler ? Pin
Luc Pattyn13-Oct-07 3:09
sitebuilderLuc Pattyn13-Oct-07 3:09 
QuestionFile splitting Logic Pin
DON34512-Oct-07 23:53
DON34512-Oct-07 23:53 
AnswerRe: File splitting Logic Pin
Guffa13-Oct-07 0:53
Guffa13-Oct-07 0:53 
AnswerRe: File splitting Logic Pin
Luc Pattyn13-Oct-07 3:11
sitebuilderLuc Pattyn13-Oct-07 3:11 
QuestionProblem in Running EXE on Network when using ODBCConnection Object Pin
kkb_200112-Oct-07 21:12
kkb_200112-Oct-07 21:12 
AnswerRe: Problem in Running EXE on Network when using ODBCConnection Object Pin
Dave Kreskowiak13-Oct-07 3:52
mveDave Kreskowiak13-Oct-07 3:52 
QuestionHelp needed to Manipulate CSV Cell data..... Pin
paulk1112-Oct-07 12:26
paulk1112-Oct-07 12:26 
Dear All im a newbie to scripting so please go easy on me.

Ive nearly finished my script but im stuck on the last points.

I need to append data in "Column A" created early in the script (groupmember.csv) with the data that is outputted by the password software last in the script, Currently its a .txt (newpasswords.txt) but could be a .csv.

Help please
thanks
paul

Option Explicit
Dim strCN, strFilter, objShell, strCmd, filePath
Dim oExcel, oSheet
' Prompt for group names and construct the filter.
strCN = ""
strFilter = "(|"
Do
strCN = InputBox("Enter Common Name of a group or Cancel", "Test")
If (strCN <> "") Then
strFilter = strFilter & "(memberOf=cn=" & strCN _
& ",ou=MYOU,dc=DOMAIN,dc=co,dc=uk)"
End If
Loop While strCN <> ""
strFilter = strFilter & ")"
' Use the WshShell object to run the csvde command.
If strFilter <> "(|)" Then
filePath = "d:\get-group\GroupMember.csv"
Set objShell = CreateObject("Wscript.Shell")
strCmd = "%comspec% /c csvde -f " & filePath & " -r """ & strFilter & """"
strCmd = strCmd & " -l givenName,userPrincipalName"
strCmd = strCmd & " -s SERVER.DOMAIN.co.UK"
objShell.Run strCmd, , True
'Deletes line 1 from GroupMember.csv
Const xlUp = -4162
Const xlLeft = -4131
Set oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
oExcel.Workbooks.Open filePath
Set oSheet = oExcel.ActiveWorkbook.Worksheets(1)
oSheet.Rows(1).Delete xlUp
'deletes Column A from GroupMember.csv
oSheet.Columns(1).Delete xlLeft
Dim c
For Each c In oSheet.UsedRange.Columns(1).Cells
c.Value = Left(LCase(c), 3)
Next
' saves the file
oExcel.DisplayAlerts = False
oExcel.ActiveWorkbook.SaveAs filePath
oExcel.ActiveWorkbook.Close
oExcel.Quit
Set oSheet = Nothing
Set oExcel = Nothing
End If
' send commandline parameters to Password Generator Professional

Set wshShell = WScript.CreateObject ("WSCript.shell")

wshShell.run """C:\Program Files\Kristanix\Password Generator Professional\PGP.exe"" /output ""d:\get-group\newpasswords.txt"" /format ""$p"" /quantity 1600 /showmsg /unique /mask ""{N:n,3,3}{N:s,1,1}""", 6, True

set wshshell = nothing
AnswerRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 3:48
mveDave Kreskowiak13-Oct-07 3:48 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 4:39
paulk1113-Oct-07 4:39 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 5:00
mveDave Kreskowiak13-Oct-07 5:00 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 6:01
paulk1113-Oct-07 6:01 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
paulk1113-Oct-07 6:09
paulk1113-Oct-07 6:09 
GeneralRe: Help needed to Manipulate CSV Cell data..... Pin
Dave Kreskowiak13-Oct-07 9:11
mveDave Kreskowiak13-Oct-07 9:11 
QuestionBindingSource Pin
sabr4912-Oct-07 9:04
sabr4912-Oct-07 9:04 
AnswerRe: BindingSource Pin
pmarfleet12-Oct-07 10:11
pmarfleet12-Oct-07 10:11 
GeneralRe: BindingSource Pin
sabr4912-Oct-07 10:40
sabr4912-Oct-07 10:40 
GeneralRe: BindingSource Pin
nlarson1112-Oct-07 10:58
nlarson1112-Oct-07 10:58 
GeneralRe: BindingSource Pin
sabr4912-Oct-07 11:19
sabr4912-Oct-07 11:19 
GeneralRe: BindingSource Pin
Dave Kreskowiak13-Oct-07 3:27
mveDave Kreskowiak13-Oct-07 3:27 
QuestionIterating and Modifying a .NET Queue? Pin
AliAmjad12-Oct-07 8:55
AliAmjad12-Oct-07 8:55 
AnswerRe: Iterating and Modifying a .NET Queue? Pin
Dave Kreskowiak13-Oct-07 3:21
mveDave Kreskowiak13-Oct-07 3:21 
GeneralRe: Iterating and Modifying a .NET Queue? Pin
AliAmjad13-Oct-07 4:52
AliAmjad13-Oct-07 4:52 
GeneralRe: Iterating and Modifying a .NET Queue? Pin
Dave Kreskowiak13-Oct-07 5:03
mveDave Kreskowiak13-Oct-07 5:03 
GeneralRe: Iterating and Modifying a .NET Queue? Pin
AliAmjad13-Oct-07 6:22
AliAmjad13-Oct-07 6:22 

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.