LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default Scroll

Hello:

I have the following code to add numbers to a cell when double clicking. Is
it poosible to do the same thing instead of double clicking just by scrolling
the scroll button on the mouse?

Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Cells.Count 1 Then Exit Sub

Cancel = True 'stop editing in cell
If IsNumeric(Target.Value) Then
Target.Value = Target.Value + 1
End If
End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)

Cancel = True 'stop pop up from showing
If ActiveCell.Value <= 1 Then
ActiveCell = ""
Else
ActiveCell.Value = ActiveCell.Value - 1
End If
End Sub


 
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
Cannot scroll with a Scroll Point Mouse Jeff (North Carolina) Excel Discussion (Misc queries) 2 January 7th 09 07:39 PM
Adding a scroll bar to a cell to scroll its contents. SkyKid Excel Programming 9 October 17th 07 09:14 PM
adding scroll bar to scroll on cell's content? Rotem Charts and Charting in Excel 0 November 16th 06 12:36 PM
Scroll horizontaly with mouse, create same system used to scroll . frederic New Users to Excel 5 October 9th 05 08:15 PM
Scroll the screen view with the scroll bar avbs Excel Discussion (Misc queries) 1 June 25th 05 04:43 PM


All times are GMT +1. The time now is 04:09 PM.

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"