Hi,
I need to work out how many components we have in stock that make up a Part - identified by being the PrimaryPart. Each part has a component, which in turn has another component, but different part have a different number fo sub-components, a simple display of the table I am using is shown below:
ID PartName ComopnentID No. in Stock PrimaryPart
1 Part X 2 12 Yes
2 Part Y 3 14 No
3 Part Z 15 No
4 Part T 5 1 Yes
5 Part U 6 11 No
6 Part V 7 25 No
7 Part W 20 No
The problem I have is that I need my vba code to check if there is a sub-compnent for the current part and if so make sure that is counted. So in the instance above Part X has 2 sub-compnents (Part Y, Part Z) and there are 41 bits in stock, whereas Part T has 3 sub-compnents (PartU, PartV, PartW) and there are 57 bits in stock.
How do I get a script to recurse X number of times to check.
Thanks
I need to work out how many components we have in stock that make up a Part - identified by being the PrimaryPart. Each part has a component, which in turn has another component, but different part have a different number fo sub-components, a simple display of the table I am using is shown below:
ID PartName ComopnentID No. in Stock PrimaryPart
1 Part X 2 12 Yes
2 Part Y 3 14 No
3 Part Z 15 No
4 Part T 5 1 Yes
5 Part U 6 11 No
6 Part V 7 25 No
7 Part W 20 No
The problem I have is that I need my vba code to check if there is a sub-compnent for the current part and if so make sure that is counted. So in the instance above Part X has 2 sub-compnents (Part Y, Part Z) and there are 41 bits in stock, whereas Part T has 3 sub-compnents (PartU, PartV, PartW) and there are 57 bits in stock.
How do I get a script to recurse X number of times to check.
Thanks