Solved

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

Posted on 2008-06-11
5
1,221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 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