Hi Joe.
Sorry. Without the entire script all I can do is read and comment. Not
debug.
Comments ....
I'm puzzled why the For Each statement is in ServiceStatus instead of
StopService.
As an experienced VBScripter you probably won't find the next bit of
advice useful - but here goes.
Your script looks sort of funky with those sleep statements in it.
It looks like you are only a small set of the functionality of those
objects and that you're using sleep statements instead of
functionality built into those objects.
Objects often have either events (which you can attach code to) or
properties which you can query in a Do loop.
Sometimes you can get lucky and find documentation for objects at
Microsoft's developer network.
Usually you're on your own.
If you're using a editor like vbsedit you can use that editor's
autocomplete functionality to get a list of Subs and Functions.
Other than that -
The first step is to identify what object you have. For example, in
your case, what is a objService2 object?
So if you were writing the code in VBA instead of VBScript how would
objService2 be Dimmed?
The next step is to go into Excel, go into the VBA Editor. Check every
library that that object might be a member of.
Go into Excel's Object Browser, and then search for that object or for
Functions or Subs you know are associated with that object.
This is useful mostly for finding events - but often getting a list of
all the functionality available to you in one spot is useful.
Events are designated in the ObjectBrowser with a lightening bolt.
For an example of how to attach code to Events see this thread:
http://groups.google.com/group/micro...d1ceec7f752247