Reputation: 3651
I have an excel sheet that I am attempting to have a scroll bar show only 10 of the possible hundreds of items on a list. I created a scroll bar, had it reference a field, for calculations. Each field that the scroll bar interacts with is referenced off the field as well. So I can't imagine why it's not working.
What is happening is that when I scroll the bar up and down the text to the right of it doesn't move. I'd like to know if it is my computer, or not. If it is my computer what would I need to do to make it work? I use VBA and I may of accidently disabled something to allow the scrolling to not work, but I don't know.
Can someone help please?
Here is the worksheet in question.
https://dl.dropbox.com/u/3327208/Excel/scrollnotworking.xlsx
Upvotes: 1
Views: 6698
Reputation: 149287
Your calculation is set to Manual.
Do this. Under the
Formulas Tab
click on Calculation Options
and then on Automatic
Now try it
FOLLOWUP
sweet perfect, is there a way in VBA to make this happen? I have to go through my code and find out if there is a spot where makes this as Manual... because I think there is. – Matt Ridge 1 min ago
There are mainly two reasons why the calculation switches to manual via VBA
1) You set it MANUAL
and then forget to set it back. For example
Sub Sample()
Application.Calculation = xlCalculationManual
'~~> Rest of your code
End Sub
2) You set it to MANUAL
in the beginning and set it AUTOMATIC
in the end but it still remains MANUAL
. This primarily happens because you didn't include proper Error Handling
because of which the code exits prematurely from the procedure. See this example
The wrong way
Sub Sample()
Application.Calculation = xlCalculationManual
'~~> Rest of your code
Application.Calculation = xlCalculationAutomatic
End Sub
The preferred way
Sub Sample()
On Error GoTo Whoa
Application.Calculation = xlCalculationManual
'~~> Rest of your code
Letscontinue:
Application.Calculation = xlCalculationAutomatic
Exit Sub
Whoa:
MsgBox Err.Description
Resume Letscontinue
End Sub
Note: If you want, You can also store the current state of Calculation
and set it back at the end of the code if you want to.
Upvotes: 2