Hi colvinb, Your code is set up nicely with indents which makes it easier to read so no worries about me laughing too hard. However, there are a few issues to discuss.
First, code like:
cannot work and more specifically
The IDE doesn't know what NA is so that alone will throw an error. You want NA to be a string value I assume so you have to cast it as a string, like
Second, this line
can be problematic for the IDE to know what sheets you want your cells' values to go onto. I took a couple lines with a declared worksheet to show you what I mean
Doing like I just did helps you to keep a focus on which sheets need what as well as lets the IDE know where to place the values.
So, what I would suggest to you is to go through your code and look for values that you want as strings and put quotes around them.
Set Variables like I did with wsMachine
In the workbook I am sending back to you, you will notice that I used
at the top of the userform module. Using this forces you to declare variables at compile time. You will benefit greatly from declaring variables like Worksheet, Range, Double, Long, and et cetera. As it is now, you can click Debug in the IDE and then click Compile VBA Project with option explicit on and the compiler will take you to every variable issue in your workbook. I would have done that for you but there is a lot of code in your workbook so I'll leave that up to you. I did add quotes to all of your "NA"'s though. Straighten up your variables and if you need more help with new issues you know where to find the answers.
Good Luck!
Bookmarks