Two Controls with One Linked Cell

elotromateo

New Member
Joined
May 19, 2010
Messages
42
I have two ActiveX controls (scrollbars), both connected to the same linked cell. One (Win) is in the same sheet as the cell, the other (Sum) is in a separate sheet. The problem is, whenever one bar is changed, I end up looking at the wrong screen. I tried having the final instruction be to go to the other sheet, since it should run through its code first and then look at the other one's code since it's value changed, but this just made it end on one sheet always.

It think the problem is that it runs the Sum scroll bar first, regardless of which was clicked first. Is there any way to force it to run it's own code before the other's?

Code:
Private Sub ScrollBarWin_Change()
'Code Here
Sheets("Summer Graphs").Select
End Sub
Code:
Private Sub ScrollBarSum_Change()
'Code Here
Sheets("Winter Graphs").Select
End Sub
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I can't do that since the linked cell is referenced in a data sheet. Both scroll bars need to be able to manipulate this data. Regardless I think I just figured it out, I split the code between both controls and it seems to be working fine now, even if I don't really understand how that worked. Thanks for the help though.
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,188
Members
452,893
Latest member
denay

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top