Hi everyone
I'm looking to fix my macro that I've created. I'm no good at actual 'programming' so I generally manually create a macro (by recording it) and then 'fix' it by changing bits of the code to suit.
I've developed an 'Interview Guide Builder', where users select or type questions that they will ask in an interview (as many or as few as they want) and then press the 'generate' button and that will generate a 'user guide'.
Here are two alternative 'processes' I want the macro to follow:
Preferred alternative
1. Unhide 'interview guide' worksheet
2. Move or copy interview guide worksheet > create copy into new workbook [may be called Book 1, book 2, book 3 etc. depending on how many spreadsheets they've opened]
3. re-hide interview guide worksheet from orginial workbook
4. In new workbook, delete range of rows where cell A? = 0
5. Save as PDF (Recruitment Interview Guide?) and save onto desktop (it will launch as a pdf)…. Will having a pdf with the same title be an issue?
6. Exit Active Workbook (ie. New book created) > Do not save changes
7.Activate PDF (Recruitment Interview Guide)
...Two documents left - original builder and pdf version of guide
Alternative if the above process won't work - this is the process I've initially attempted to record
1. Unhide 'nterview guide' worksheet
2. Move or copy interview guide worksheet > create copy into new workbook [may be called Book 1, book 2, book 3 etc. depending on how many spreadsheets they've opened]
3. re-hide interview guide worksheet from orginial workbook
4. In new workbook, delete range of rows where cell A? = 0
5. Protect Sheet (ie. No changes) in new workbook (no password required)
...Two documents left - original builder and new excel guide
At the moment I'm up to Step 4 in either of the processes, but can't find a code to suit. Where the user hasn't input a question for that section (eg. they may only choose 4/15 questions for section 1), there are "0"s in those sections. I want to delete a range of cells (I've highlighted the range that will apply each time... it is a total of 7 rows each time (4 rows above the cell, the row the cell is in and 2 rows below the cell). It would need to loop to catch all the rows as they're deleted. At the moment, it only deletes the ones I manually selected... however, the user might choose more or less questions than that..Copy of Interview Guide Builder.xlsm.
Can someone help me with this please? And if it isn't too cheeky, if anyone could assist with steps 5-7 in my first process... that would be AMAZING! 
I've attached an example of the file (please note the 'interview guide' is hidden currently) and my code that I've used is below:
Thank you!!!
Bookmarks