Hi, I'm hoping someone can help.
I don't have a lot of experience with creating macros on Excel but I have been following a tutorial to create tabs in a sheet. The idea is when someone selects one of the tabs for example, sale by revenue/sales by units, the relevant graph will appear. The code which I have been given is as below and it works for the guy in the tutorial but not for me and I don't know why!
I hope someone can help me work out where I am going wrong!
I don't have a lot of experience with creating macros on Excel but I have been following a tutorial to create tabs in a sheet. The idea is when someone selects one of the tabs for example, sale by revenue/sales by units, the relevant graph will appear. The code which I have been given is as below and it works for the guy in the tutorial but not for me and I don't know why!
I hope someone can help me work out where I am going wrong!
VBA Code:
Sub Display_Tab_Sales_Revenue()
With ActiveSheet
'Visibility of Tab Buttons
.Shapes("Units_Inactive").Visible = True
.Shapes("Units_Active").Visible = False
.Shapes("Revenue_Inactive").Visible = True
.Shapes("Revenue_Active").Visible = False
'Visibility of Tab Contents
.Shapes("Line_Chart_Revenue").Visisble = True
.Shapes("Line_Chart_Unit").Visible = False
End With
End Sub
Sub Display_Tab_Sales_Units()
With ActiveSheet
'Visibility of Tab Buttons
.Shapes("Units_Inactive").Visible = False
.Shapes("Units_Active").Visible = True
.Shapes("Revenue_Inactive").Visible = False
.Shapes("Revenue_Active").Visible = True
'Visibility of Tab Contents
.Shapes("Line_Chart_Reveue").Visible = False
.Shapes("Line_Chart_Unit").Visible = True
End With