# Can a "result scroller" be made?

#### mortgageman

##### Well-known Member
From what I gather, tools such as scroll bars and spin buttons are for USER input. What if the input is a number and the RESULT are the factors of the number. You don't know how many factors there are until the user inputs the choice. Therefore, the results may be bigger than the size of whatever you are putting them into. Is there are way to put the results into a textbox (or whatever) that has the ability to scroll?

Gene, "The Mortgage Man", Klein

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Gene

What are you actually trying to do?

What about using a listbox to display the results?

I'm actually trying to display the factors of a number. Until the user enters the number the number of factors is unknown.

I thought a listbox was for user entry, not for results. Do I have to do something special to use it for results? Will it add the up and down arrows if the results are bigger than the box, or must I do that somehow?

Gene, "The Mortgage Man", Klein

Code:
``````Private Sub cmdGetFactors_Click()

TheNum = Me.txtNumberEntered

If IsNumeric(TheNum) Then
For Num = 1 To TheNum
If TheNum Mod Num = 0 Then
With Me.ListBox1
End With
End If
Next Num
End If
End Sub``````

Nimrod - way more than I asked, but of course Thanks!

Two questions. Is there any way to supress the horizontal left and right arrows from the listbox?

What is the purpose of adding the ListIndex (as it doesn't seem to show up in the listobox itself)

Gene, "The Mortgage Man", Klein

One more question

Upon testing I realized that I needed this: How do you remove ALL the items from a list box? I have to clean out the list box if the user tries to get the factors of another number.

Gene, "The Mortgage Man", Klein

Code:
``ListBox1.Clear``

Replies
4
Views
682
Replies
6
Views
4K
Replies
3
Views
1K
Replies
1
Views
422
Replies
1
Views
892

1,196,079
Messages
6,013,309
Members
441,760
Latest member
Sharina

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back