Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Click event on Scrollbar

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Click event on Scrollbar

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.

--
HTH. Best wishes Harald
Excel MVP

Followup to newsgroup only please.

"Sam K" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a double click event for cell? Ayo Excel Discussion (Misc queries) 3 June 6th 08 12:18 AM
Is Multi click Event possible? Ayo Excel Discussion (Misc queries) 6 August 31st 07 10:42 PM
ListBox Click Event BHatMJ Excel Discussion (Misc queries) 6 June 21st 07 09:34 PM
On click button event [email protected] Excel Worksheet Functions 1 November 30th 06 04:39 PM
Mouse Click Event Srinath Excel Programming 2 July 18th 03 04:03 AM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"