R
RVF
I have several Macro's thst toggle on/off see example text line on/off below
Sub text_wrap()
'
' text_wrap Macro
' Macro recorded 3/24/2008 by Raytheon
'
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
If .WrapText = False Then
.WrapText = True
Else
.WrapText = False
End If
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
this works OK I am trying to write a macro that can zoom in to 120% and
then zoom back out to 100% my code below does not work
Sub zoom()
'
' Zoom Macro
' Macro recorded 3/15/2010 by
'
If ActiveWindow.zoom.Percentage = 120 Then
ActiveWindow.zoom.Percentage = 100
Else
ActiveWindow.zoom.Percentage = 120
End If
End Sub
Sub text_wrap()
'
' text_wrap Macro
' Macro recorded 3/24/2008 by Raytheon
'
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
If .WrapText = False Then
.WrapText = True
Else
.WrapText = False
End If
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
this works OK I am trying to write a macro that can zoom in to 120% and
then zoom back out to 100% my code below does not work
Sub zoom()
'
' Zoom Macro
' Macro recorded 3/15/2010 by
'
If ActiveWindow.zoom.Percentage = 120 Then
ActiveWindow.zoom.Percentage = 100
Else
ActiveWindow.zoom.Percentage = 120
End If
End Sub