Hi,
I'd like to add the necessary code to a CommandButton (called CommandButton_Choose_These_Students) that does the following five (5) things ...
1. Creates a new worksheet (which is to be a copy of a worksheet called ... Student Profile Template) for each ID number found in the range ... PrintTemplate!AH49:AH400 .... most likely, out of all those cells, there might only be a handful that actually have a student ID in them,
sometimes perhaps 60 or so, but I have to cover the possibility of more.
2. Each of the new sheets created should be named the ID Number that was found in the range mentioned above .... so, if there were just three ID numbers found in that range (the ID numbers being ... 32765, 34985, 23660), then three new sheets should be created and named 32765, 34985, and 23660.
3. Print just Page 1 (Range A1:Y39) of each of those new Sheets made.
4. Delete those very same sheets, once the printing has been done. There will be other sheets that exist in the workbook that I do not want deleted, so just delete the sheets that were created in step 1
5. Clear the contents of the following four ranges ...
* PrintTemplate!W49:W400
* PrintTemplate!Z49:Z400
* PrintTemplate!AC49:AC400
* PrintTemplate!AC49:AC400
Out of interest, is there a way to code it so each is printed as a PDF ? If not, absolutely not a problem ... just interested.
Any help with the coding of this would be hugely appreciated.
Very kindest regards,
Chris
I'd like to add the necessary code to a CommandButton (called CommandButton_Choose_These_Students) that does the following five (5) things ...
1. Creates a new worksheet (which is to be a copy of a worksheet called ... Student Profile Template) for each ID number found in the range ... PrintTemplate!AH49:AH400 .... most likely, out of all those cells, there might only be a handful that actually have a student ID in them,
sometimes perhaps 60 or so, but I have to cover the possibility of more.
2. Each of the new sheets created should be named the ID Number that was found in the range mentioned above .... so, if there were just three ID numbers found in that range (the ID numbers being ... 32765, 34985, 23660), then three new sheets should be created and named 32765, 34985, and 23660.
3. Print just Page 1 (Range A1:Y39) of each of those new Sheets made.
4. Delete those very same sheets, once the printing has been done. There will be other sheets that exist in the workbook that I do not want deleted, so just delete the sheets that were created in step 1
5. Clear the contents of the following four ranges ...
* PrintTemplate!W49:W400
* PrintTemplate!Z49:Z400
* PrintTemplate!AC49:AC400
* PrintTemplate!AC49:AC400
Out of interest, is there a way to code it so each is printed as a PDF ? If not, absolutely not a problem ... just interested.
Any help with the coding of this would be hugely appreciated.
Very kindest regards,
Chris