Solved

Error 'loop' without 'do' but a 'do while' is there...

Posted on 2008-06-11
5
1,215 Views
Last Modified: 2011-10-19
I printed an old copy and the current copy of the script and cannot see the problem. There is a "Do While" loop in the beginning and the "loop" statement is at the end but the error persists. Attached is a .txt version of the script getting the error.
Any help from "fresh eyes" is greatly appreciated.

NewU.txt
0
Comment
Question by:bstillion
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 250 total points
ID: 21760989
Hi bstillion,

The "fresh eyes" thing definitely can help!

The reason you're getting the error is you have an un-closed If statement on line 227:
       If objFSO.FolderExists(strHomeFolder) Then

Because there is no corresponding End If for that, the Loop you do have can't find it's Do in the same If block.  Not sure where you want to put the End If for that, but that is what is causing the error.

Matt
0
 

Author Comment

by:bstillion
ID: 21761879
Matt,
I put an "End If to complete that If statement but the error message
still states I have a 'loop' witout an assoicated 'Do' somewhere.

Any other sytax errors you notice?

I'll keep looking.
Brad
0
 

Author Comment

by:bstillion
ID: 21761927
Matt,
Please disregard my last post.
I was fixing the wrong file and now have corrected the .vbs file rather than the .txt file.

My scirpt is working perfectly. Thanks again for you quick analysis and response.

Brad
0
 

Author Closing Comment

by:bstillion
ID: 31466181
Matt,
Thanks so much. I'm so close to the end of this script that will save me and the others in the department time and eliminate the tedious task of creating user accounts manually.
Brad
0
 
LVL 35

Expert Comment

by:mvidas
ID: 21762108
Glad to help! Don't hesitate to ask if you need any more help, if I can assist I will :)

Matt
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question