Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mathematical equation for counter 1

Status
Not open for further replies.

JadeKnight

IS-IT--Management
Feb 23, 2004
94
0
0
NO
I need to trigger an event in script when each time a counter passes a given number. Let's say 1000.

Below is a sample of what I want to achieve.

Code:
Option Explicit

Dim oShell
Dim iCounter,i

'Create Shell object
Set oShell = Wscript.CreateObject("Wscript.Shell")

iCounter = 0

wscript.echo iCounter

For i = 1 To 100000

iCounter = iCounter + 1

If [some statement when iCounter is 1000, 2000, 3000 etc...] Then
  wscript.echo iCounter
End If

Next


Set oShell = Nothing

I've red on the while... wend, but I think maybe a smart if statement also will do the thing.

Any help would be appreciated :)...
 
Read the documents for Mod.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I've allready red that one, however I still can't figure out a smart equation that will be true on a given interval.
 
lol... figured it out. Thx, sometimes it's better to think simplicity :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top