Fernandez30
Member
How can I merge two codes together to run as one.
What I want is I have a sheet renamed as "Dashboard", I want code 1 to do its work of aligning my charts at the same time formula bar to hide on ONLY that sheet.
Formula bar to be visible on all other sheets.
Code 1
>>> use code - tags <<<
What I want is I have a sheet renamed as "Dashboard", I want code 1 to do its work of aligning my charts at the same time formula bar to hide on ONLY that sheet.
Formula bar to be visible on all other sheets.
Code 1
>>> use code - tags <<<
Code:
Private Sub worksheet_Activate()
With ActiveSheet.Shapes("chart 4")
.Left = Range("C3").Left
.Top = Range("C3").Top
End With
With ActiveSheet.Shapes("chart 5")
.Left = Range("E3").Left
.Top = Range("E3").Top
End With
With ActiveSheet.Shapes("chart 20")
.Left = Range("G3").Left
.Top = Range("G3").Top
End With
'With ActiveSheet.Shapes("chart 3")
' .Left = Range("C5").Left
' .Top = Range("C5").Top
'End With
'With ActiveSheet.Shapes("chart 6")
' .Left = Range("E5").Left
' .Top = Range("E5").Top
'End With
'With ActiveSheet.Shapes("chart 11")
' .Left = Range("C7").Left
' .Top = Range("C7").Top
'End With
'With ActiveSheet.Shapes("chart 15")
' .Left = Range("E7").Left
' .Top = Range("E7").Top
'End With
With ActiveSheet.Shapes("chart 2")
.Left = Range("I3").Left
.Top = Range("I3").Top
End With
End Sub
**************************************************************************************************************************************
Code 2
Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "Dashboard" Then
Application.DisplayFormulaBar = False
Else
Application.DisplayFormulaBar = True
End If
End Sub
Last edited by a moderator: