ActiveX Scrollbar after dragging event

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,924
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Let's assume the activecell is A1 (the name box in the top left of the worksheet shows A1).

My worksheet contains an ActiveX scrollbar.

When I left-click the scrollbar and drag it, then let go, the scrollbar remains flashing and the name box is empty.

What I am seeking is for the cursor to stop flashing and the name box to show A1.

Currently, this can be achieved manually by pressing the esc key after dragging the scrollbar.

Can this be achieved with VBA, perhaps an after dragging event for ActiveX scrollbars?

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Maybe:
VBA Code:
Private Sub ScrollBar1_GotFocus()
    ActiveWindow.RangeSelection.Select
End Sub
 
Upvote 0
Solution
Maybe:
VBA Code:
Private Sub ScrollBar1_GotFocus()
    ActiveWindow.RangeSelection.Select
End Sub
Thanks, that's done exactly what I wanted.

Initially I added break points to all the events related to scrollbars but ScrollBar1_GotFocus didn't seem to be activated when I released the mouse.
 
Upvote 0

Forum statistics

Threads
1,223,869
Messages
6,175,087
Members
452,611
Latest member
bls2024

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