Yes, that's been my experience. However, if you're getting the "Subscript
out of range" error, that's the first thing I would check. 

-----Original Message-----
From: Rich Milburn [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 21, 2003 8:45 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] [slightly OT] scripting add users

Excel should do that automatically right?

-----Original Message-----
From: Coleman, Hunter [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 9:18 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] [slightly OT] scripting add users

Make sure that for each line in the sheet, you have the same number of
fields even if some of the fields are blank. You might have to massage your
input csv file to make sure that's the case. So if you have something like
this:

John,Doe,Sales,Houston,Texas
Jane,Smith,Accounting,Arizona

You would want to modify that to

John,Doe,Sales,Houston,Texas
Jane,Smith,Accounting,,Arizona 

-----Original Message-----
From: Rich Milburn [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 8:08 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] [slightly OT] scripting add users

That's what I was doing at first but I kept getting errors like the
subscript out of range.  I found that error on MSDN and maybe it's related
to the fact I have about 8 properties in the sheet but some of them are
blank for some records?? I'm trying a couple of things to fix it (like Dim
Array2(10)).  Is there anything obvious I might be missing on arrays, like
does an array in vbscript "fill up" if you assign values to it too many
times, or something like that??

I appreciate the scripts everyone's sending!  I know however that there are
easier ways to do this, except that for the PlumTree Portal and programs
we're writing for it, certain fields have to be formatted in certain ways,
there are store accounts and user accounts and they have to be treated
differently, passwords have to be generated and logged for reference, and
each separate CSV has to be put in its own group.  It's good practice, and
fun (in a perverse way).  I think each day I have been doubling my scripting
ability... have made some pretty cool scripts for the password expiration
project.  Anyway again thanks for all the help!

Rich

-----Original Message-----
From: Coleman, Hunter [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 8:43 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] [slightly OT] scripting add users

I'm not sure about your specific problem, but you could simplify things a
bit by dropping the second array.....

Do Until objFile.AtEndOfStream
 strNextLine = objTextFile.Readline
 Array1 = Split(strNextLine, ",")
 'Call populate users sub
Loop 

-----Original Message-----
From: Rich Milburn [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 7:23 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] [slightly OT] scripting add users


I think this is a basic question but I am really new to scripting...

I'm adding users from a csv file and using an array to read the csv split
into lines, then spitting each line into another array (split for commas)
from the first array.  Do I need to do something to the array#2 before I
repopulate it with the next line?  If this is confusing, this might help

Array1 = Split(objFile, vbCrLf)

For n = 1 to Ubound(Array1)
        '*** do something to Array2 here??
        Array2 = Split(Array1(n), ",")
        'Call populate users sub
Next

The reason I ask is I keep getting weird errors that don't seem to correlate
to the data being read in (I was getting these when I was reading in one
line at a time into Array2) errors like Subscript out of range, etc - and
googling only showed things from ASP pages that didn't apply.


Thanks for any help
Rich

-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this message or
any attachments. This information is strictly confidential and may be
subject to attorney-client privilege. This message is intended only for the
use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International,
Inc. reserves the right to monitor and review the content of all messages
sent to and from this e-mail address. Messages sent to or from this e-mail
address may be stored on the Applebee's International, Inc. e-mail system.
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this message or
any attachments. This information is strictly confidential and may be
subject to attorney-client privilege. This message is intended only for the
use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International,
Inc. reserves the right to monitor and review the content of all messages
sent to and from this e-mail address. Messages sent to or from this e-mail
address may be stored on the Applebee's International, Inc. e-mail system.
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
-------APPLEBEE'S INTERNATIONAL, INC. CONFIDENTIALITY NOTICE-------
PRIVILEGED / CONFIDENTIAL INFORMATION may be contained in this message or
any attachments. This information is strictly confidential and may be
subject to attorney-client privilege. This message is intended only for the
use of the named addressee. If you are not the intended recipient of this
message, unauthorized forwarding, printing, copying, distribution, or using
such information is strictly prohibited and may be unlawful. If you have
received this in error, you should kindly notify the sender by reply e-mail
and immediately destroy this message. Unauthorized interception of this
e-mail is a violation of federal criminal law. Applebee's International,
Inc. reserves the right to monitor and review the content of all messages
sent to and from this e-mail address. Messages sent to or from this e-mail
address may be stored on the Applebee's International, Inc. e-mail system.
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to