ActiveX Scrollbar after dragging event

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,913
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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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