Morning everyone,
I am currently attempting to make a document that would use tabs to pull columns created throughout the sheet. I can create tabs in the first level using very basic VBA, but I need assistance from wizards such as yourselves to achieve what I'm looking for. I've attached an image, each tab in the first level would pull information that would allow secondary information to be pulled. Each numbered Section will have its own set of Task ID's that come up. My code is too rudimentary to be efficient, and it is taking me forever to figure this out of my own:
Option Explicit
Sub TabAFE1()
With Sheet1
.Application.ScreenUpdating = False
.Shapes("Section-A").Visible = msoCTrue
.Shapes("Section-A OFF").Visible = msoFalse
.Shapes("Section-B").Visible = msoFalse
.Shapes("Section-B OFF").Visible = msoCTrue
.Shapes("Section-C").Visible = msoFalse
.Shapes("Section-C OFF").Visible = msoCTrue
.Shapes("Section-D").Visible = msoFalse
.Shapes("Section-D OFF").Visible = msoCTrue
.Shapes("Section-E").Visible = msoFalse
.Shapes("Section-E OFF").Visible = msoCTrue
.Shapes("Section-F").Visible = msoFalse
.Shapes("Section-F OFF").Visible = msoCTrue
.Shapes("Section-G").Visible = msoFalse
.Shapes("Section-G OFF").Visible = msoCTrue
.Shapes("Section-H").Visible = msoFalse
.Shapes("Section-H OFF").Visible = msoCTrue
.Shapes("Section-I").Visible = msoFalse
.Shapes("Section-I OFF").Visible = msoCTrue
.Shapes("Section-J").Visible = msoFalse
.Shapes("Section-J OFF").Visible = msoCTrue
.Shapes("Section-K").Visible = msoFalse
.Shapes("Section-K OFF").Visible = msoCTrue
.Shapes("A_TASKv1").Visible = msoCTrue
.Shapes("A_TASKv1 OFF").Visible = msoFalse
.Shapes("A_TASKv1.1").Visible = msoFalse
.Shapes("A_TASKv1.1 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.2").Visible = msoFalse
.Shapes("A_TASKv1.2 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.3").Visible = msoFalse
.Shapes("A_TASKv1.3 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.4").Visible = msoFalse
.Shapes("A_TASKv1.4 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.5").Visible = msoFalse
.Shapes("A_TASKv1.5 OFF").Visible = msoCTrue
.Shapes("AFE-Av1 SUMMARY").Visible = msoFalse
.Shapes("AFE-Av1 SUMMARY OFF").Visible = msoCTrue
.Shapes("TAB RESET").Visible = msoCTrue
.Range("B:AF").EntireColumn.Hidden = False
.Range("AG:BJQ").EntireColumn.Hidden = True
.Application.ScreenUpdating = False
End With
End Sub
Is what I would like to do possible? I am very new to VBA, please be gentle!
I am currently attempting to make a document that would use tabs to pull columns created throughout the sheet. I can create tabs in the first level using very basic VBA, but I need assistance from wizards such as yourselves to achieve what I'm looking for. I've attached an image, each tab in the first level would pull information that would allow secondary information to be pulled. Each numbered Section will have its own set of Task ID's that come up. My code is too rudimentary to be efficient, and it is taking me forever to figure this out of my own:
Option Explicit
Sub TabAFE1()
With Sheet1
.Application.ScreenUpdating = False
.Shapes("Section-A").Visible = msoCTrue
.Shapes("Section-A OFF").Visible = msoFalse
.Shapes("Section-B").Visible = msoFalse
.Shapes("Section-B OFF").Visible = msoCTrue
.Shapes("Section-C").Visible = msoFalse
.Shapes("Section-C OFF").Visible = msoCTrue
.Shapes("Section-D").Visible = msoFalse
.Shapes("Section-D OFF").Visible = msoCTrue
.Shapes("Section-E").Visible = msoFalse
.Shapes("Section-E OFF").Visible = msoCTrue
.Shapes("Section-F").Visible = msoFalse
.Shapes("Section-F OFF").Visible = msoCTrue
.Shapes("Section-G").Visible = msoFalse
.Shapes("Section-G OFF").Visible = msoCTrue
.Shapes("Section-H").Visible = msoFalse
.Shapes("Section-H OFF").Visible = msoCTrue
.Shapes("Section-I").Visible = msoFalse
.Shapes("Section-I OFF").Visible = msoCTrue
.Shapes("Section-J").Visible = msoFalse
.Shapes("Section-J OFF").Visible = msoCTrue
.Shapes("Section-K").Visible = msoFalse
.Shapes("Section-K OFF").Visible = msoCTrue
.Shapes("A_TASKv1").Visible = msoCTrue
.Shapes("A_TASKv1 OFF").Visible = msoFalse
.Shapes("A_TASKv1.1").Visible = msoFalse
.Shapes("A_TASKv1.1 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.2").Visible = msoFalse
.Shapes("A_TASKv1.2 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.3").Visible = msoFalse
.Shapes("A_TASKv1.3 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.4").Visible = msoFalse
.Shapes("A_TASKv1.4 OFF").Visible = msoCTrue
.Shapes("A_TASKv1.5").Visible = msoFalse
.Shapes("A_TASKv1.5 OFF").Visible = msoCTrue
.Shapes("AFE-Av1 SUMMARY").Visible = msoFalse
.Shapes("AFE-Av1 SUMMARY OFF").Visible = msoCTrue
.Shapes("TAB RESET").Visible = msoCTrue
.Range("B:AF").EntireColumn.Hidden = False
.Range("AG:BJQ").EntireColumn.Hidden = True
.Application.ScreenUpdating = False
End With
End Sub
Is what I would like to do possible? I am very new to VBA, please be gentle!