Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 27th, 2005, 06:03 AM
Registered User
Join Date: Jun 2005
Location: Swindon, Wiltshire, United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Shabir Hussain
Default Generating Squentila numbers in VBA

 Can any one help on explaing how to do sequential numbering in VBA.
Thank you!!!!

Shabir Hussain
  #2 (permalink)  
Old June 27th, 2005, 06:20 AM
Friend of Wrox
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts

Not quite sure what you're after but if you want a set of numbers use might as well use the for...next loop
The Step syntax tells how many to count each time the loop goes around, e.g. a step 2 means the number will count from 1 then 3, 5,7,9 then because 'to 10' has been set the value will dtop at 9.

sub myForNextLoop()
dim myLoop as integer
for myLoop = 1 to 10 step 2
'actions go here
end sub



Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating random numbers invisibleman18 Java Basics 2 March 26th, 2007 12:22 AM
Generating Charts with VBA davidimurray Excel VBA 5 September 21st, 2006 08:04 AM
Generating report via VBA in Access gurkie Access 2 July 16th, 2006 02:16 PM
[?] Line numbers in VBA Chantale Access VBA 6 November 3rd, 2004 07:17 AM
generating automatic numbers laxmi_praveena Classic ASP Basics 1 April 5th, 2004 12:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.