Does this work for you?
' Assuming you have a UserForm named UserForm1 with a ListBox named ListBox1 ' and two CommandButtons named btnPageUp and btnPageDown Private Sub btnPageUp_Click() Dim lngPageSize As Long Dim lngNewTopIndex As Long ' Determine the page size (e.g., number of visible items) ' This might require some trial and error or calculation based on font size and listbox height ' For simplicity, let's assume a fixed page size for now lngPageSize = 10 ' Adjust as needed ' Calculate the new TopIndex for Page Up lngNewTopIndex = Me.ListBox1.TopIndex - lngPageSize ' Ensure we don't go below 0 If lngNewTopIndex < 0 Then lngNewTopIndex = 0 End If ' Apply the new TopIndex Me.ListBox1.TopIndex = lngNewTopIndex End Sub Private Sub btnPageDown_Click() Dim lngPageSize As Long Dim lngNewTopIndex As Long Dim lngLastPossibleTopIndex As Long ' Determine the page size lngPageSize = 10 ' Adjust as needed ' Calculate the new TopIndex for Page Down lngNewTopIndex = Me.ListBox1.TopIndex + lngPageSize ' Calculate the maximum possible TopIndex to avoid going past the end ' ListCount - 1 is the last item index ' Subtracting (lngPageSize - 1) helps ensure the last page shows full content if possible lngLastPossibleTopIndex = Me.ListBox1.ListCount - Me.ListBox1.ListRows ' ListRows is often useful here If lngLastPossibleTopIndex < 0 Then lngLastPossibleTopIndex = 0 ' Handle empty listbox If lngNewTopIndex > lngLastPossibleTopIndex Then lngNewTopIndex = lngLastPossibleTopIndex End If End If ' Apply the new TopIndex Me.ListBox1.TopIndex = lngNewTopIndex End Sub