Active X button for displaying and hiding sheets

drhatmrexcel

Board Regular
Joined
Oct 30, 2009
Messages
69
I have a Work book (spreadsheets) that I am using for tracking and checking construction project pay applications from contractors to project owners. By default when first opened only the “Help” tab (spreadsheet) is displayed, but there are actually 73 total sheets in the Workbook at this time.
There are three up front spread sheets named “Help”, “Project Data”, and “Pay Apps, Num, Totals”. Then there are 35 sheets for each Pay Application #1 and Pay Application #2.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Here is the list of default spreadsheets and their names.<o:p></o:p><o:p> </o:p><o:p> </o:p><TABLE style="MARGIN: auto auto auto 4.7pt; WIDTH: 346pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=461><TBODY><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap>UP FRONT SHEETS<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>
1<o:p></o:p>
</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>
2<o:p></o:p>
</TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 1"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 2"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap>HELP<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 1<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 1<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 3"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap>PROJECT DATA<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 1)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 1)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 4"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap>Pay Apps, Num, Totals<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 2)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 2)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 5"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 3)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 3)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 6"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 4)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 4)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 7"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 5)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 5)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 8"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 6)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 6)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 9"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 7)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 7)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 10"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 8)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 8)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 11"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 9)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 9)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 12"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Pg 10)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Pg 10)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 13"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 (Totals)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #99ffcc; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 (Totals)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 14"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 1)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 1)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 15"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 2)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 2)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 16"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 3)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 3)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 17"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 4)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 4)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 18"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 5)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 5)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 19"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 6)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 6)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 20"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 7)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 7)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 21"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 8)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 8)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 22"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 9)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 9)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 23"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Pg 10)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Pg 10)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 24"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 3 (Totals)<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #c5be97; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 3 (Totals)<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 25; mso-yfti-lastrow: yes"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 1.5in; PADDING-RIGHT: 5.4pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=144 noWrap></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: yellow; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 1, Part 2 - 3 combine<o:p></o:p></TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 119pt; PADDING-RIGHT: 5.4pt; BACKGROUND: yellow; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=159 noWrap>App 2, Part 2 - 3 combine<o:p></o:p><o:p> </o:p>
<o:p></o:p>
On the only default visible tab (spreadsheet) titled “Help” I have a macro button (Press Here to begin) to allow the user to begin using the workbook, create additional sets of applications beyond the initial 2, and then display (unhide) all of the pertinent sheets. Please note that any of the sheets highlighted in yellow are always hidden from the user as I use them for calc sheets and for updating the Up front sheet titled “Pay Apps, Num, Totals”<o:p></o:p><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape style="WIDTH: 400.5pt; HEIGHT: 484.5pt" id=_x0000_i1025 type="#_x0000_t75"><v:imagedata o:title="jeanie3" src="file:///C:\Users\DHEGGE~1.NEA\AppData\Local\Temp\msohtmlclip1\01\clip_image001.gif"></v:imagedata></v:shape><o:p></o:p><o:p> </o:p>
This macro will display a User form and request that the user input a whole number from 3 to 200. When executed the macro will then create additional sets of work sheets for as many pay applications that the user has chosen to create. So the Workbook will grow exponetionally by 35 sheets for each pay application set created. The macro will then unhide the majority of the sheets and then exit and allow the user to begin using the workbook/spreadsheet(s).<o:p></o:p><o:p> </o:p>
On the second tab in the workbook I have a sheet called “Project Data”. On this “Project Data” sheet is some sets of Active X Option Buttons as well as some data cells requiring user input to fill in the following pay application sheets automatically.<o:p></o:p>
Excel Workbook
ABCDEFGHIJKLM
1You must enter data in all cells that are red below !! Then switch to the next tab
2(Pay Apps, Num, Totals) and enter pay period dates, application date & retainage %
3Choose Basis of Bid/Contract: (Select Only 1 - Enter a " x " (lower case only) in either cell B4 or B6 but not both)1 sheet 30 items2 sheets 60 items3 sheets 90 items4 sheets 120 items5 sheets 150 items6 sheets 180 items7 sheets 210 items8 sheets 240 items9 sheets 270 items10 sheets 300 items
4SELECT: Lump SumSELECT: # of Part 2 or 3 sheets to display (hide/unhide) 30 items per sheet, 10 sheets (300 items available) (Default is all 10 sheets - 300 items)
5or
6SELECT: Unit Price
PROJECT DATA
Excel 2007


As construction projects are usually bid, priced and paid on either a Lump Sum basis or a Unit price basis, dependent on the project the user would select either of the two active x option buttons that I have placed in cells B4 or B6 on the “Project Data” spreadsheet to display or hide respectively the portions of the spread sheets that apply or don’t apply to either the Lump Sum or Unit Price project payment method. I have this working OK and either all of the sheets with either Part 2 or Part 3 in the sheet names are hidden or made visible (toggled) by the user selecting Lump Sum or Unit Price. Here is the code that works fine and accomplishes this. This cuts the number of sheets displayed in nearly half and makes it a whole lot less confusing and also quicker to manually scroll through the sheets.<o:p> </o:p>
***********************
Code:
Private Sub OptionButton1_Click()
      Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Worksheets
If InStr(1, ws.Name, "Part 3 (", vbTextCompare) > 0 Then ws.Visible = xlSheetHidden
If InStr(1, ws.Name, "Part 2 (", vbTextCompare) > 0 Then ws.Visible = xlSheetVisible
Next ws
      Application.ScreenUpdating = True
          Sheets("PROJECT DATA").Visible = True
    Sheets("PROJECT DATA").Select
    ActiveSheet.Unprotect Password:="lock"
    Range("B4").Select
    ActiveCell.FormulaR1C1 = "X"
    With ActiveCell.Characters(Start:=1, Length:=1).Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .Color = 100
        .ColorIndex = xlAutomatic
'       .TintAndShade = 1
'       .ThemeFont = xlThemeFontNone
    End With
    Range("B6").Select
    Selection.ClearContents
    With ActiveCell.Characters(Start:=1, Length:=1).Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 100
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .Color = 0
        .ColorIndex = xlAutomatic
'       .TintAndShade = 1
'       .ThemeFont = xlThemeFontNone
    End With
    Range("B12").Select
    Range("B12").Activate
'   Activebook.Range("B12").Activate
'    Application.ScreenUpdating = True
    ActiveSheet.Protect Password:="lock"
End Sub<o:p></o:p>
Private Sub OptionButton2_Click()
      Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Worksheets
If InStr(1, ws.Name, "Part 2 (", vbTextCompare) > 0 Then ws.Visible = xlSheetHidden
If InStr(1, ws.Name, "Part 3 (", vbTextCompare) > 0 Then ws.Visible = xlSheetVisible
Next ws
      Application.ScreenUpdating = True
          Sheets("PROJECT DATA").Visible = True
    Sheets("PROJECT DATA").Select
    ActiveSheet.Unprotect Password:="lock"
    Range("B6").Select
    ActiveCell.FormulaR1C1 = "X"
    With ActiveCell.Characters(Start:=1, Length:=1).Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 100
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .Color = 0
        .ColorIndex = xlAutomatic
'       .TintAndShade = 1
'       .ThemeFont = xlThemeFontNone
    End With
    Range("B4").Select
    Selection.ClearContents
    With ActiveCell.Characters(Start:=1, Length:=1).Font
        .Name = "Arial"
        .FontStyle = "Regular"
        .Size = 100
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .Color = 0
        .ColorIndex = xlAutomatic
'       .TintAndShade = 1
'       .ThemeFont = xlThemeFontNone
    End With
    Range("B12").Select
    Range("B12").Activate
'   Activebook.Range("B12").Activate
'    Application.ScreenUpdating = True
    ActiveSheet.Protect Password:="lock"
End Sub

What I would like to do is reduce the number of visible sheets further to reduce user confusion.
Here is where I haven’t been able to come up with correct code for ten additional active x buttons that I have placed in cells D through M of row 5 that will allow the user to select the number of sheets to display or hide sheet tabs based on the number of pay items in the project. These sheets are labeled with App #, Part # (PG 1) through App #, Part # (Pg 10). As the number of pay items may grow due to change orders in some projects it might be necessary for the user to come back to this “Project Data” sheet from time to time and select an incrementally higher number which would automatically display additional sheets. What I don’t want the active x control to do is unhide all sheets, and then hide only the unneeded (PG #) sheets. As the Part # sheets for the project were hidden or displayed under the code above for the active x control in cells B4 and B6, I don’t want to get caught up in an infinite loop.<o:p> </o:p>
I tried code such as this for the Option 3 button but it crashed out.<o:p> </o:p><TABLE style="MARGIN: auto auto auto 4.7pt; WIDTH: 384pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=512><TBODY><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap>Private Sub OptionButton3_Click()<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 1"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> Application.ScreenUpdating = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 2"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap>'Sub Hide_shts()<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 3"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> Dim ws As Worksheet<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 4"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> For Each ws In ThisWorkbook.Worksheets<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 5"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 2", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 6"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 7"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 3", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 8"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 9"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 4", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 10"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 11"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 5", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 12"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 13"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 6", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 14"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 15"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 7", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 16"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 17"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 8", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 18"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 19"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 9", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 20"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 21"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> If InStr(1, ws.Name, "Pg 10", vbTextCompare) Then<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 22"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> ws.Visible = False<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 23"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap> Next ws<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 24"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap>' End If<o:p></o:p></TD></TR><TR style="HEIGHT: 12.75pt; mso-yfti-irow: 25; mso-yfti-lastrow: yes"><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 384pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #ffc000; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0; PADDING-TOP: 0in" vAlign=bottom width=512 noWrap>End Sub<o:p></o:p><o:p> </o:p><o:p> </o:p><o:p>All to no avail. So any pointers? </o:p><o:p> </o:p>
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I'm not sure I follow everything, but maybe try something like this.

This will show all the "Pg" sheets that have a Pg number <=3 and hide the "Pg" sheets with a value >3

This assumes the Pg sheets end in this naming convention (Pg #)

Code:
Sub OptionButton[COLOR="Red"]3[/COLOR]_Click()
    Application.ScreenUpdating = False
    'Sub Hide_shts()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    
        If ws.Name Like "*(Pg *)" Then [COLOR="Green"]'Change only "(Pg #)" sheets[/COLOR]
    
            ws.Visible = CInt(Replace(Trim(Right(ws.Name, 3)), ")", "")) [COLOR="Red"]<= 3[/COLOR]
            
        End If
    Next ws
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Well that does hide all of the sheets with Pg # greater than 3, it also unhides the other sheets (Part 2 or Part 3 sheets) that I had sucessfully hidden with option 1 and option 2 buttons respectively.

So I am trying to take your working code and figure out what needs to be added to keep it from doing the unwanted unhide.

Thanks for the code lines.

Dennis
 
Upvote 0
Code:
Sub OptionButton3_Click()
    Application.ScreenUpdating = False
    'Sub Hide_shts()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    
        If ws.Name Like "*(Pg 3)" Then ws.Visible = True 

    Next ws
    Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
i ended up with code similar to this and there was 20 buttons and changes to code per each of the 20 different buttons.
Now I am heading back to figure out some conditional formatting based on which of the 20 option buttons are selected by the user.

Thanks again for getting me headed in the right direction.

Dennis
<TABLE style="WIDTH: 370pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=493><COLGROUP><COL style="WIDTH: 370pt; mso-width-source: userset; mso-width-alt: 18029" width=493><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 370pt; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17 width=493>' cell D4</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17>' Show Pg 1 work sheet</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> Application.ScreenUpdating = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> 'Sub Hide_shts() Part 2 - Pg 1</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> For Each ws In ThisWorkbook.Worksheets</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 1)" Then ws.Visible = True</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 2)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 3)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 4)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 5)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 6)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 7)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 8)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 9)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg 10)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 2*(Pg Totals)" Then ws.Visible = True</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 1)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 2)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 3)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 4)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 5)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 6)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 7)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 8)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 9)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Pg 10)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> If ws.Name Like "*Part 3*(Totals)" Then ws.Visible = False</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> Next ws</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=17> Application.ScreenUpdating = True</TD></TR></TBODY></TABLE>
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top