View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_104_] p45cal[_104_] is offline
external usenet poster
 
Posts: 1
Default Multiple Variables' Declaration In Loops


Sub test()
Dim RangesArray()
Dim Counter As Long
Counter = Application.InputBox("How Many Ranges?", , , , , , , 1)
ReDim RangesArray(Counter)
For x = 1 To Counter
Set RangesArray(x) = Application.InputBox("Select Range", Type:=8)
Next x
For Z = 1 To Counter
MsgBox "Range " & Z & " comprised of " & RangesArray(Z).Address
Next
End Sub


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=133672