LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel VBA - changing variables during a loop

For i = 10 To 100 Step 10
....
Next

???

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ellis_x " wrote in message
...
Hi,

I am trying to write a loop code using the For...Next statements, for a
counter running from 1 To 100. However, I want to change the value of
two of the variables (there are 5 used in the procedure) after counter
= 10, then again at 20, 30, and so on.

I have not been able to figure out how to do this without repeating the
code with the new value for the variable re-defined.

Has anyone got any ideas of how to overcome this problem?

Cheers


---
Message posted from http://www.ExcelForum.com/



 
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
finding the results of changing 4 variables irrhelp Excel Discussion (Misc queries) 4 June 19th 12 10:11 PM
Setting Multiple Variables with a loop jlclyde Excel Discussion (Misc queries) 6 November 11th 09 09:40 PM
Changing the values of variables mickiedevries[_6_] Excel Programming 0 June 23rd 04 07:48 PM
Loop for changing cell formatting Matt Excel Programming 1 January 15th 04 03:47 PM
Changing objects on other Worksheets with Variables Dave Baranas Excel Programming 3 August 10th 03 07:29 PM


All times are GMT +1. The time now is 08:03 AM.

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

About Us

"It's about Microsoft Excel"