Hi Guys, i have tried a couple of things to fix this one
I have 16 lists on screen, each list represents a route number,
I have tried setting variables as Integer knowing the variables are whole numbers, then converting to Long using Clng(), i was receiving runtime error 6 overload which is normally an incorrect variable setting and after multiplying the TWIPS there is a result of 1404246 in the immediate window, still receive an overload (Now Set to Long) to accommodate large numbers that may calculate to include decimals.
Is there a better way of doing this ?
So my intention is because there 16 list boxes, i want the option to expand the top row of lists to display without having to scroll on each list
Once I know the best method, i can expand/collapse a row of lists at a time.
Code:Const TWIPS_PER_CM As Long = 283 Dim intMainIndex As Integer, intIndex As Integer Dim lngOrgSize As Long, lngLarge As Long Dim strPath As String, strFile As String intMainIndex = Me.tbcMainMenu.Value ' Tab Page Index intIndex = Me.cboOption7.ListIndex 'Combo Index lngLarge = 4962 lngOrgSize = 2210 Select Case intMainIndex Case Is = 2 'VIEW ROUTES Select Case intIndex Case Is = 0 ' LISTS 1,5,9,13 With Me.lstRoute1 Debug.Print lngLarge * TWIPS_PER_CM Stop .Height = (lngLarge * TWIPS_PER_CM) End With With Me.lstRoute5 .Height = (lngLarge * TWIPS_PER_CM) End With With Me.lstRoute9 .Height = (lngLarge * TWIPS_PER_CM) End With With Me.lstRoute13 .Height = (lngLarge * TWIPS_PER_CM) End With Case Is = 4 'REST TO ORIGIONAL SIZE With Me.lstRoute1 .Height = (lngOrgSize * TWIPS_PER_CM) End With With Me.lstRoute5 .Height = (lngOrgSize * TWIPS_PER_CM) End With With Me.lstRoute9 .Height = (lngOrgSize * TWIPS_PER_CM) End With With Me.lstRoute13 .Height = (lngOrgSize * TWIPS_PER_CM) End With End Select End Select