![]() |
|
#6
|
||||
|
||||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Word 2010 Run-Time error 4198 with Insert Picture with Caption and Fram Macro | jstills116 | Word VBA | 0 | 06-24-2016 07:46 AM |
| Help Please: New VBA user trying to use a macro to split Mail Merge documents. Two Run-Time Error | zipit189 | Word VBA | 7 | 03-18-2015 01:13 PM |
Shift Excel Cell after executing a macro for second time
|
LearningMacro | Excel Programming | 2 | 01-08-2015 03:05 PM |
Run Time Error 4248 when opening Word Doc from Excel
|
CIF | Excel Programming | 12 | 02-21-2014 02:27 PM |
Run-time Error 5174: Open Word Documents from Excel
|
tinfanide | Excel Programming | 3 | 10-01-2013 07:35 AM |