I have a routine that imports a Microsoft project plan. That all works perfectly.
I'd like to create some VBA code that would apply the "+" and "-" to collapse and expand groups based on the WBS code.
I'd like a "+" by the 1, 1.1, 1.1.1, 1.2, 1.3 and so on depending on the indent level when imported. That way I can hide sections that either are complete in the project or that may not be in play yet. I think it could/would be dependent on possibly counting the periods "." in the string in the WBS column but can't wrap my head around doing that with the nested situation this presents. It's possible there could be 7 or more levels.
Any help would be appreciated.
Those WBS codes look as follows for example:
[TABLE="width: 132"]
<colgroup><col width="176" style="width: 132pt; mso-width-source: userset; mso-width-alt: 6257;"> <tbody>[TR]
[TD="class: xl67, width: 176, bgcolor: white"]0[/TD]
[/TR]
[TR]
[TD="class: xl68, width: 176, bgcolor: white"]1[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.3[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.4[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.5[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.6[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.3[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.3[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.3.1[/TD]
[/TR]
</tbody>[/TABLE]
I'd like to create some VBA code that would apply the "+" and "-" to collapse and expand groups based on the WBS code.
I'd like a "+" by the 1, 1.1, 1.1.1, 1.2, 1.3 and so on depending on the indent level when imported. That way I can hide sections that either are complete in the project or that may not be in play yet. I think it could/would be dependent on possibly counting the periods "." in the string in the WBS column but can't wrap my head around doing that with the nested situation this presents. It's possible there could be 7 or more levels.
Any help would be appreciated.
Those WBS codes look as follows for example:
[TABLE="width: 132"]
<colgroup><col width="176" style="width: 132pt; mso-width-source: userset; mso-width-alt: 6257;"> <tbody>[TR]
[TD="class: xl67, width: 176, bgcolor: white"]0[/TD]
[/TR]
[TR]
[TD="class: xl68, width: 176, bgcolor: white"]1[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.3[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.4[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.5[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.1.6[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.1[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.2[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.2.3[/TD]
[/TR]
[TR]
[TD="class: xl69, width: 176, bgcolor: white"]1.3[/TD]
[/TR]
[TR]
[TD="class: xl70, width: 176, bgcolor: white"]1.3.1[/TD]
[/TR]
</tbody>[/TABLE]