What the loop is doing with the 'problem' cells.find statement above is to go to sheets whose names are listed as Cases, e.g. Line A, Line B, Line C, etc.
Whenever it goes to one of these worksheets (for example Line B), it determines what the last row in the A column is, then makes a string of the address of A2 to G(lastrow).
It then goes to the WSName worksheet, the main worksheet where the form is being created, and determines what row the next section starts in order to insert a number of rows right above it, pushing the next section down, that will fit the future copy range.
It then inserts the new sub-section name (Line B Equipment), copies the range from the Line B sheet, and pastes it in the WSName worksheet in the range it created by inserting rows.
It then goes to the next case "Line C", and starts over again
Bookmarks