jeffreybrown
Well-known Member
- Joined
- Jul 28, 2004
- Messages
- 5,149
Hi All,
I am trying to combine two Worksheet_SelectionChange events into one, but with the code below I get a compile error: Else without If. What can be done to correct this?
I am trying to combine two Worksheet_SelectionChange events into one, but with the code below I get a compile error: Else without If. What can be done to correct this?
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Address <> "$B$4" Then Exit Sub
ActiveWindow.Zoom = 120
SendKeys "%{down}"
Else
ActiveWindow.Zoom = 100
End If
End Sub