I am having trouble coming up with a VBA code to find a part number I am searching for and then finding the highest (or last row) serial number, adding 1 to that number and creating a new line item.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]Serial Number[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]023[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
[TR]
[TD]6524X[/TD]
[TD]018[/TD]
[TD]Washer[/TD]
[/TR]
</tbody>[/TABLE]
I want it to find "5462H" and then realize the last serial number input was 023. Create a new line shown below:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]Serial Number[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]023[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
[TR]
[TD]6524X[/TD]
[TD]018[/TD]
[TD]Washer[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]024[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
</tbody>[/TABLE]
I am not inputting in text, just a click of a command button with the label "5462H"
Thanks
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]Serial Number[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]023[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
[TR]
[TD]6524X[/TD]
[TD]018[/TD]
[TD]Washer[/TD]
[/TR]
</tbody>[/TABLE]
I want it to find "5462H" and then realize the last serial number input was 023. Create a new line shown below:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]Serial Number[/TD]
[TD]Description[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]023[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
[TR]
[TD]6524X[/TD]
[TD]018[/TD]
[TD]Washer[/TD]
[/TR]
[TR]
[TD]5462H[/TD]
[TD]024[/TD]
[TD]Pan Head Screw[/TD]
[/TR]
</tbody>[/TABLE]
I am not inputting in text, just a click of a command button with the label "5462H"
Thanks