See attached.
LBRS was
Empty/
Nothing at that stage in the code. I've reinstated that line.
Headers in
Report B, if present, should exactly match those in
Sheet1
Headers should only be on one row. There should be no duplicate headers in
Sheet1.
I've copied the headers from
Report B to
Sheet1 but really I should have reduced the headers on
Sheet1 to 1 row and re-written the code which puts the headers in
Report B to match those in
Sheet1. I was lazy.
You have to get the Control names exactly right in the code. Corrected.
At least now it works to a degree, over to you to add the ifs and buts, checks etc.
For instance if someone chooses
None from your dropdown for the
Adhesive Type, are there entries in that column with the literal string
None in them?, or are you hoping to show results for when there is nothing in those cells? There's a putative line in there which you can remove if I've got this wrong.
There are a few commented-out lines of code which you might end up needing to use.
Try to avoid
On Error Resume Next too much unless you know an error might be thrown and why, otherwise it hides errors while debugging.
The code:
Code:
On Error Resume Next
Set newsht = Sheets("Report B")
On Error GoTo 0
has the
On Error Resume Next because the next line will always throw an error if the sheet doesn't exist, but the
On Error Goto 0 returns error reporting to normal straight after.