Re: Cycle through variables

Tech-Archive recommends: Speed Up your PC by fixing your registry



That worked perfectly, Richard - Thanks a ton for clearing that up. I have
one last question that is still related to this issue, though. I'm
currently pulling the domain in (as seen below as domain.com) statically.
Is there a way to pull that attribute from the user object (I did try the
userprincipalname, but that's not necessarily what I'm looking for) or
specify another variable to go to the sub also?

For example, the alert txt would show this:
1. smithj (domain1.com)
2. admin (domain1.com)
3. paul (domain2.com
etc.

And the echo csv would show this:
domain1.com,,smithj
domain1.com,,admin
domain2.com,,paul

Andy idea on how to fit this in or send to the sub-routine you came up with?
--
Tim

Sub EnumGroup(strGroup)
Set objGroup = GetObject ("LDAP://"; & strGroup)
For each objMember in objGroup.Members
i = i + 1
AlertReportXX = i&". "&objMember.sAMAccountName&" (domain.com)"
objTextFile2.WriteLine(AlertReportXX)
EchoXX = "domain.com,,"&objMember.sAMAccountName
objTextFile.WriteLine(EchoXX)
Next

End Sub


.



Relevant Pages

  • Re: Macro to copy only used cells
    ... ' Macro recorded 02/09/2008 by Richard ... ' Keyboard Shortcut: Ctrl+n ... Sub FERDRUN() ... ' FERDRUN Macro ...
    (microsoft.public.excel.programming)
  • Re: When and Why use "Me."?
    ... > Hi Richard, ... > In the example class below, Me is used to disambiguate between Sub New's ... > Public Property LastNameAs String ... > Public Sub ChangeLastName ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Manage errors
    ... Richard, thanks for the suggestion. ... Sub trap_errors ... > ' Turn off normal error handling for the statement that might fail. ... > On Error GoTo 0 ...
    (microsoft.public.windows.server.scripting)
  • Re: Modifiy this script to read a nested "Computers" container
    ... I ran the below script and received the following error. ... >There are computer accounts in both the top level OU called Site1 and ... >Thanks Richard for your help. ... >Sub GetLocalAdmins ...
    (microsoft.public.scripting.wsh)
  • Re: spell checking error
    ... You Rock Marsh. ... > End Sub ... > Richard wrote: ... This is a memo field, not a text field, if that makes a difference. ...
    (microsoft.public.access.formscoding)