Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

One liner ? ReDim Preserve

7 views
Skip to first unread message

Aoli

unread,
Apr 18, 2022, 5:13:42 PM4/18/22
to


Private m_acAccel() as Variant

Done in an another Sub m_acAccel(0 to oVScrollbae.UBound)

Call Fixit(vscScroll, Array(1,2,3), Array(4,5), Array(6,7,8))

Sub Fixit(oVScrollBar As Object, ParamArray avDir() As Variant)

For Index = 0 to oVScrollbae.UBound

oVScrollBar(Index).Min = avDir(Index)(0)
oVScrollBar(Index).Max = avDir(Index)(1)

' handle the case where only two items in array e.g. array(4,5)
' one-liner ? and without ':'
' but if cannot, the ':' allowed.

ReDim Preserve ...


If avDir(Index)(2) > 0 Then
m_avAccel(Index) = avDir(Index)(2)

Else
m_avAccel(Index) = 5

End If

Next Index

End Sub
0 new messages