LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Re-assigning the value of a variable for a for loop from

Afternoon all,

I have a for loop that is initialised but then needs to
change the value for the number of loops:

#########################
For iQaRunDbaseSheet = 1 To (iArraySize + 1)

............

If i 1 Then
iMaxSheet = Worksheets.Count
Worksheets.Add after:=Sheets(iMaxSheet)
iArraySize = iArraySize + 1
End If

#################################################

Whilst the actual variable changes its value, the for loop
only executes the number of times that was initially
assigned to it. Is there anyway I can get the for loop to
run the number of times i want it to rather than the
initial value ?

Thanks,

Mike.
 
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
Assigning values to a variable set John A[_2_] Excel Discussion (Misc queries) 1 April 23rd 10 08:20 PM
Loop with variable name? Mike Excel Discussion (Misc queries) 6 April 25th 09 05:12 AM
Assigning a variable Zack Excel Worksheet Functions 3 December 11th 08 07:00 PM
Assigning Variable Range JMay Excel Discussion (Misc queries) 1 July 7th 07 04:52 PM
Insert Variable Number of Rows; With Loop ryguy7272 Excel Worksheet Functions 2 December 27th 06 08:25 PM


All times are GMT +1. The time now is 08:39 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"