- Katılım
- 19 Aralık 2011
- Mesajlar
- 101
- Excel Vers. ve Dili
- 2003
tr
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Select the range that will activate the code
If Target.Address = "$A$2" Then
'If the range is selected then zoom to 20 percent larger
'To zoom 40 percent larger change the 6 to a 7
'in the two ActiveWindow.zoom lines below
'the numbers represent a ratio-6 is 20 percent larger than 5
'and 7 is 40 percent larger than 5, etc.
'you could even use 2/1 and 1/2 to get 200 percent and back
ActiveWindow.Zoom = ActiveWindow.Zoom * 6 / 5
[A5000] = "zoomed"
ElseIf [A5000] = "zoomed" Then
'Otherwise set the zoom to original
ActiveWindow.Zoom = ActiveWindow.Zoom * 5 / 6
[A5000].ClearContents
End If
End Sub
( Bu formüldeki $A$2 ...... yeri ( B1:B50 ) arası değiştirirsek işimi görücek aslında...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Select the range that will activate the code
If Target.Address = "$A$2" Then
'If the range is selected then zoom to 20 percent larger
'To zoom 40 percent larger change the 6 to a 7
'in the two ActiveWindow.zoom lines below
'the numbers represent a ratio-6 is 20 percent larger than 5
'and 7 is 40 percent larger than 5, etc.
'you could even use 2/1 and 1/2 to get 200 percent and back
ActiveWindow.Zoom = ActiveWindow.Zoom * 6 / 5
[A5000] = "zoomed"
ElseIf [A5000] = "zoomed" Then
'Otherwise set the zoom to original
ActiveWindow.Zoom = ActiveWindow.Zoom * 5 / 6
[A5000].ClearContents
End If
End Sub
( Bu formüldeki $A$2 ...... yeri ( B1:B50 ) arası değiştirirsek işimi görücek aslında...
