LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Re : Excel event handler Worksheet_SelectionChange

Re : Excel event handler Worksheet_SelectionChange

Mr. Mike,

I was eager to attempt something useful (believe me) for myself.
Nevertheless, the on-going programming exercise could hardly be spoken
of neutrally ; it's in a state of quagmire and so, it's not hereby
presentable.

I have attempted to install a Scrollbar on an Excel Worksheet ; and
then, the Scrollbar should avail itself at an instant notice (namely,
a single click) by virtue of SelectionChange. I would have deployed
BeforeDoubleClick. However, in comparison, the latter summon could
only be served with twice as much effort, sigh.

The following concoction (for which I must hasten to offer apology) is
merely an instance to illustrate the plight over the suspension of
Excel Cut-and-Paste operations.

Private Sub ScrollBar1_Change()

ActiveCell = ActiveCell.Address(ReferenceStyle:=xlR1C1)

AcellRow = ActiveCell.Row: ScroColumn = ActiveCell.Column

SB1value = 5: RegFontHeight = 10.2

'The alignment of ScrollBar1 on to ScroColumn will commence
hereinafter.
ScrollBar1.Top = ActiveSheet.Cells(AcellRow, ScroColumn + 1).Top
ScrollBar1.Left = ActiveSheet.Cells(AcellRow, ScroColumn + 1).Left
ScrollBar1.Height = SB1value * RegFontHeight
ActiveCell.RowHeight = SB1value * RegFontHeight

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

ActiveCell = ActiveCell.Address

AcellRow = ActiveCell.Row: ScroColumn = ActiveCell.Column

SB1value = 5: RegFontHeight = 10.2

'The alignment of ScrollBar1 on to ScroColumn will commence
hereinafter.
ScrollBar1.Top = ActiveSheet.Cells(AcellRow, ScroColumn + 1).Top
ScrollBar1.Left = ActiveSheet.Cells(AcellRow, ScroColumn + 1).Left
ScrollBar1.Height = SB1value * RegFontHeight
ActiveCell.RowHeight = SB1value * RegFontHeight

End Sub

By virtue of the code above, the ActiveCell displays its own
A1-address ; clicking the Scrollbar would convert the address to R1C1
style.
The requirement is, Copy-and-Paste operations should be restored ;
Please enlighten.
Otherwise, how to circumvent the suspension of Copy-and-Paste ? What
is the viable and amicable alternative to achieve the same ?

Thank you for your comment. Regards.
 
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
Worksheet_change event handler error gen Excel Discussion (Misc queries) 0 January 18th 08 04:55 AM
What code do I use to attach event handler that will open my user. TeresaManley Excel Worksheet Functions 2 May 5th 07 09:55 PM
Where?Worksheet code module or Worksheet_SelectionChange event han Kenzie Excel Worksheet Functions 4 January 30th 06 09:41 PM
Worksheet_SelectionChange not working Bo Rasmussen New Users to Excel 1 December 13th 04 02:34 PM
Re : Excel event handler Worksheet_SelectionChange TKT-Tang Excel Programming 1 July 16th 03 07:21 AM


All times are GMT +1. The time now is 07:30 AM.

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

About Us

"It's about Microsoft Excel"