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: 211
Default Multiple Variables' Declaration In Loops

Any idea how to declare multiple variables depending upon the times looping
shall be carried on.

An idea may be grasped by my unfit CoDe as below:

Sub test()
Dim Counter As Long
Counter = Application.InputBox("How Many Ranges?", , , , , , , 1)
For x = 1 To Counter
Dim Range & x As range
set Range & x = application.InputBox("Select Range " & x)
Next
For Z = 1 To Counter
msgbox "Range "& Z " comprised of " & (Range & Z).address
Next
End Sub

Please help me out by rectifying the above code, or designing a similar code
or referring to a site, for which I shall be grateful.

Thanx in advance.

--
Best Regards,

Faraz
 
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
Passing Variables within For loops to other modules tomjermy Excel Programming 1 August 22nd 06 06:07 PM
Help please! Loops? For Each? Variables? Roger Excel Programming 2 April 27th 05 01:17 PM
Multiple loops one result hotherps[_56_] Excel Programming 2 May 11th 04 06:09 PM
Correct declaration of variables Bob Phillips[_6_] Excel Programming 1 November 30th 03 03:08 PM
Correct declaration of variables marko Excel Programming 1 November 30th 03 09:56 AM


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