On May 29, 5:43*am, "McKirahan" <N...@xxxxxx> wrote:
Quote:
> "Daz" <darren.black...@xxxxxx> wrote in message
>
> news:924ce5de-fac5-4157-8e20-eec9b1af3666@xxxxxx
> On May 27, 5:41 am, "McKirahan" <N...@xxxxxx> wrote:
> Quote:
> > "Daz" <darren.black...@xxxxxx> wrote in message
>
> [snip]
> Quote:
> > Just 1 final question... how do i remove the need for all fields to
> > have an option checked? i.e. if only 4 fields are checked - then i
> > would still like it to write to the txt files obviously omitting the
> > field not checked.
>
> Replace these lines:
>
> * * If iMAX = cMAX Then
> * * * * Set objFSO = CreateObject("Scripting.FileSystemObject")
> * * * * For intDIC = 1 To UBound(arrDIC)
> * * * * * * strCTF = arrDIC(intDIC) & ".txt"
> * * * * * * Set objCTF = objFSO.CreateTextFile(strCTF,True)
> * * * * * * * * objCTF.Write arrCTF(intDIC)
> * * * * * * Set objCTF = Nothing
> * * * * * * s = s & "<li>" & strCTF & " : " &
> Replace(arrCTF(intDIC),vbCrLf," ") & vbCrLf
> * * * * Next
> * * Else
> * * * * Alert("Only " & iMAx & " of " & cMAX & " radio buttons checked!")
> * * * * Exit Sub
> * * End If
>
> with these lines:
>
> * * If iMAX <> cMAX Then
> * * * * strMSG = "Only " & iMAx & " of " & cMAX & " radio buttons checked!"
> * * * * If MsgBox(strMSG,vbQuestion+vbOKCancel,"Continue?") = vbCancel Then
> Exit Sub
> * * End If
> * *'*
> * * Set objFSO = CreateObject("Scripting.FileSystemObject")
> * * For intDIC = 1 To UBound(arrDIC)
> * * * * strCTF = arrDIC(intDIC) & ".txt"
> * * * * Set objCTF = objFSO.CreateTextFile("~" & strCTF,True)
> * * * * * * objCTF.Write arrCTF(intDIC)
> * * * * Set objCTF = Nothing
> * * * * s = s & "<li>" & strCTF & " : " & Replace(arrCTF(intDIC),vbCrLf," ")
> & vbCrLf
> * * Next
>
> Watch for word-wrap. Ok the one thing this edit doesn't address is that fact that in the
final script i am working on the name field with be dynamically
populated from WMI and therefore i cannot use object & i as a array
building option...