Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning number of subscripts? MyVar(x)
With MyVar(x),
x being unknown. Is their a method to find x? Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning number of subscripts? MyVar(x)
Jason,
The question is unclear. x is a variable in this case, which must have been set within the code and you can query it MsgBox x Debug.Print x -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jason" wrote in message ... With MyVar(x), x being unknown. Is their a method to find x? Jason |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning number of subscripts? MyVar(x)
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning number of subscripts? MyVar(x)
Are you trying to get the index in an array?
Example: Sub test() Dim arr() As Long, i As Long, blnFound As Boolean, lngFind As Long ReDim arr(1 To 100) For i = 1 To 100 arr(i) = i * 5 Next '' find lngFind = 50 blnFound = False For i = LBound(arr) To UBound(arr) If arr(i) = lngFind Then blnFound = True Exit For End If Next If blnFound Then MsgBox i End If End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "Jason" wrote in message ... With MyVar(x), x being unknown. Is their a method to find x? Jason |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to use subscripts in my formulas? | Excel Discussion (Misc queries) | |||
Subscripts | Excel Discussion (Misc queries) | |||
Superscripts and Subscripts | Excel Discussion (Misc queries) | |||
Is there a way to have "subscripts" in Excel? | Excel Discussion (Misc queries) |