Click event on Scrollbar

S

Sam K

I would like to know how to trigger formatting (text
wrapping)of the visible screen on a worksheet from a mouse
click on the scroll bar or slider in Excel. I did that
using the selectionchange worksheet event in the code that
follows, however it only applies to cell changes and user
sees text unwrapped. I would like the user to avoid seeing
the text in the process of being wrapped. Thanks in
advance, Sam

Public Sub worksheet_selectionchange(ByVal Target As
Excel.Range)
With Application
.ScreenUpdating = False
.EnableEvents = False
Windows(1).VisibleRange.Select
With Selection
.WrapText = True
End With
Target.Select
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
 
H

Harald Staff

What you want is a "window scroll" event. I think you are out of luck on this one. The
only ones available is Activate, Deactivate and Resize, and I can't think of any
workaround trick for this. Hopefully someone can.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top