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: 10
Default Code will not fire

Hi,
I copied this code from Debra Dalgleish's wonderful site contextures.com. It
does not work for me. I placed the code in a module in the workbook. It
should zoom when the active cell has Data Valadation. When I activate a cell
the code will not fire. Any suggestions? Please help.
TIA
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngDV As Range
Dim intZoom As Integer
Dim intZoomDV As Integer
intZoom = 100
intZoomDV = 120
Application.EnableEvents = False
On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo errHandler
If rngDV Is Nothing Then GoTo errHandler
If Intersect(Target, rngDV) Is Nothing Then
With ActiveWindow
If .Zoom < intZoom Then
.Zoom = intZoom
End If
End With
Else
With ActiveWindow
If .Zoom < intZoomDV Then
.Zoom = intZoomDV
End If
End With
End If
exitHandler:
Application.EnableEvents = True
Exit Sub
errHandler:
GoTo exitHandler
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
how to set out a fire risk documunt kate Excel Discussion (Misc queries) 1 November 22nd 06 02:11 PM
Event doesn't fire Frank Xia Excel Discussion (Misc queries) 6 February 11th 06 12:54 AM
Custom function does not fire r[_3_] Excel Programming 3 November 27th 05 02:43 PM
Fire Event only when Cell Change? HotRod Excel Programming 7 April 28th 05 08:43 PM
Workbook_SheetChange will not fire Robert Willard Excel Programming 1 September 10th 03 07:52 PM


All times are GMT +1. The time now is 06:59 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"