J
Joel Mills
I have been successful in keeping other macros from creating a flashing
screen upon running them, but the following two macros flicker when
switching between worksheets even though I have added Application Screen
updating = False as the first line and = True in the last line of the code.
Does this happen because I am activating the Worksheets? If so how can I
modify the code to ungroup and regroup the shapes to allow input from the
users to change the text? Also any help in cleaning up the code which was
modified after recording the macro would be appreciated.
Joel
Sub Regroup()
Application.ScreenUpdating = False
'This Regroups the Curve Header
Sheets("Curve").Activate
ActiveSheet.Shapes.Range(Array("Curve Line No. 1", "Curve Line No. 2",
_
"Curve Line No. 3", "Curve Line No. 4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Curve Header"
'This Regroups the Left Footer
ActiveSheet.Shapes.Range(Array("Left Footer L1", "Left Footer L2", _
"Left Footer L3", "Left Footer L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Left Footer"
'This Regroups the Right Footer
ActiveSheet.Shapes.Range(Array("Right Footer L1", "Right Footer L2", _
"Right Footer L3", "Right Footer L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Right Footer"
'This Regroups the Histogram Title
Sheets("Histogram").Select
ActiveSheet.Shapes.Range(Array("Histogram L1", "Histogram L2", _
"Histogram L3", "Histogram L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Histogram Title"
Sheets("Curve").Activate
Application.ScreenUpdating = True
End Sub
Sub Ungroup()
'
Application.ScreenUpdating = False
' Ungroup Macro
Worksheets("Curve").Activate
ActiveSheet.Shapes.Range(Array("Curve Header", "Left Footer", "Right
Footer")). _
Select
Selection.ShapeRange.Ungroup.Select
Sheets("Histogram").Activate
ActiveChart.Shapes("Histogram Title").Select
Selection.ShapeRange.Ungroup.Select
Worksheets("Curve").Activate
Application.ScreenUpdating = True
End Sub
screen upon running them, but the following two macros flicker when
switching between worksheets even though I have added Application Screen
updating = False as the first line and = True in the last line of the code.
Does this happen because I am activating the Worksheets? If so how can I
modify the code to ungroup and regroup the shapes to allow input from the
users to change the text? Also any help in cleaning up the code which was
modified after recording the macro would be appreciated.
Joel
Sub Regroup()
Application.ScreenUpdating = False
'This Regroups the Curve Header
Sheets("Curve").Activate
ActiveSheet.Shapes.Range(Array("Curve Line No. 1", "Curve Line No. 2",
_
"Curve Line No. 3", "Curve Line No. 4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Curve Header"
'This Regroups the Left Footer
ActiveSheet.Shapes.Range(Array("Left Footer L1", "Left Footer L2", _
"Left Footer L3", "Left Footer L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Left Footer"
'This Regroups the Right Footer
ActiveSheet.Shapes.Range(Array("Right Footer L1", "Right Footer L2", _
"Right Footer L3", "Right Footer L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Right Footer"
'This Regroups the Histogram Title
Sheets("Histogram").Select
ActiveSheet.Shapes.Range(Array("Histogram L1", "Histogram L2", _
"Histogram L3", "Histogram L4")).Select
Selection.ShapeRange.Regroup.Select
Selection.Name = "Histogram Title"
Sheets("Curve").Activate
Application.ScreenUpdating = True
End Sub
Sub Ungroup()
'
Application.ScreenUpdating = False
' Ungroup Macro
Worksheets("Curve").Activate
ActiveSheet.Shapes.Range(Array("Curve Header", "Left Footer", "Right
Footer")). _
Select
Selection.ShapeRange.Ungroup.Select
Sheets("Histogram").Activate
ActiveChart.Shapes("Histogram Title").Select
Selection.ShapeRange.Ungroup.Select
Worksheets("Curve").Activate
Application.ScreenUpdating = True
End Sub