Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default variable number of For Next loops

Maybe...

dim iCtr as long
dim X as long

x = 99
for ictr = 1 to x
msgbox ictr
next ictr



KAH wrote:

Is there any way I can have a variable number of nested For ... Next loops?
In other words, I want x loops. If x=2 there would be 2 loops, if x=3, 3
loops.

This is a follow-up to a question I posted May 29 about all permutations.
The answer I got was helpful and gave me ideas but didn't actually solve my
problem. I realize what I really need to figure out is the variable number of
loops.

Thanks for any help.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable Step rates in loops gtslabs Excel Programming 2 February 16th 09 03:19 AM
How to sum a variable number of items RobinC Excel Worksheet Functions 2 May 30th 08 08:14 AM
Error Number: 91 object variable or With block Variable not set Hifni Excel Programming 1 January 9th 08 11:56 AM
variable string and loops Mourinho Excel Programming 2 October 27th 04 09:15 PM
Using a variable as a Row number Phil Hennessy Excel Programming 3 August 6th 04 05:56 PM


All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"