Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Cycle thru 1 to n in a loop


'count from 1 to N over and over
Dim Result As Long , N As Long

While True
  Result = Result Mod N + 1
Wend