GeoThornton96
New Member
- Joined
- Jul 5, 2020
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hello, I have a macro on one sheet (A1) that I would like to run on that sheet(A1) but to be activated from another sheet (Home) if that makes sense. This is the code that I want to run and is on (A1).
and then on another sheet(HOME), I have a macro that hides and shows shapes but I also want it to run the macro above. I do know how to do this. this is the code for that
I am very new to VBA so sorry if my code is terrible. I appreciate the help
VBA Code:
Sub HANDSET()
'
' HANDSET Macro
' Macro recorded 04/07/2020 by GThornton
'
'
Selection.AutoFilter Field:=4, Criteria1:="HANDSET"
End Sub
and then on another sheet(HOME), I have a macro that hides and shows shapes but I also want it to run the macro above. I do know how to do this. this is the code for that
VBA Code:
Public Sub TypeHandset()
If ActiveSheet.Shapes("Rectangle 12").Visible Then
ActiveSheet.Shapes("Rectangle 12").Visible = False
ActiveSheet.Shapes("Rectangle 13").Visible = False
ActiveSheet.Shapes("Rectangle 14").Visible = False
ActiveSheet.Shapes("Rectangle 15").Visible = False
ActiveSheet.Shapes("Rectangle 16").Visible = False
ActiveSheet.Shapes("Rectangle 17").Visible = False
Else
ActiveSheet.Shapes("Rectangle 12").Visible = True
ActiveSheet.Shapes("Rectangle 13").Visible = True
End If
End Sub
I am very new to VBA so sorry if my code is terrible. I appreciate the help