Bill_Biggs
Well-known Member
- Joined
- Feb 6, 2007
- Messages
- 1,216
Here is a portion of a macro I am working on:
<font face=Courier New>YesNo = MsgBox("Are you sure you want " & Z & " ?", vbYesNo)<br> <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> YesNo<br> <SPAN style="color:#00007F">Case</SPAN> vbNo<br> <SPAN style="color:#00007F">GoTo</SPAN> Alpha<br> <SPAN style="color:#00007F">Case</SPAN> vbYes<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN><br> </FONT>
<font face=Courier New><SPAN style="color:#00007F">Dim</SPAN> value <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN><br><SPAN style="color:#00007F">Set</SPAN> rng1 = Range("C3:E6")<br>varRanges = VBA.Array("B100", "C100", "D100", "E100", "F100", "G100", "H100", "I100", "J100", "K100", "L100", "f100")<br></FONT>
I need to know if there is a way I can get into the range (VBA.Array) and place a variable that can take on the Z values instead of the the 100's? So if Z=95 the the array would read as B95, C95 etc...
Thanks,
<font face=Courier New>YesNo = MsgBox("Are you sure you want " & Z & " ?", vbYesNo)<br> <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> YesNo<br> <SPAN style="color:#00007F">Case</SPAN> vbNo<br> <SPAN style="color:#00007F">GoTo</SPAN> Alpha<br> <SPAN style="color:#00007F">Case</SPAN> vbYes<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN><br> </FONT>
<font face=Courier New><SPAN style="color:#00007F">Dim</SPAN> value <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN><br><SPAN style="color:#00007F">Set</SPAN> rng1 = Range("C3:E6")<br>varRanges = VBA.Array("B100", "C100", "D100", "E100", "F100", "G100", "H100", "I100", "J100", "K100", "L100", "f100")<br></FONT>
I need to know if there is a way I can get into the range (VBA.Array) and place a variable that can take on the Z values instead of the the 100's? So if Z=95 the the array would read as B95, C95 etc...
Thanks,