Hello all,
My issue might be easy for some of you since I am not that experienced with Macros.
Here is a description of my project.
My initial Workbook, called MAINworkbook has one main visible sheet where user launches a userform. (20 other sheets are hidden)
Userform has 20 checkboxes where each is linked to one sheet. User will check whatever checkbox and after hitting enter;
1) A new workbook will be created Book1
2) Hidden sheets associated to every box that was checked will become visible and copied to the new workbook Book1
3) MAINworkbook will close
This was working perfectly fine.
However, I have recently did some updates and my VBA hasn't been working well.
For every hidden sheet, I have added a command button. When this button is clicked, a print preview of the page will show.
When user is running the actual VBA:
1) A new workbook will be created Book1
2) Hidden sheets associated to every box that was checked will become visible and copied to the new workbook Book1
3) Initial MAINworkbook will close
4) When user clicks on this new command button, the print preview setup will show up.
5) After closing that print preview page, the MAINworkbook will open again.
How to prevent that MAINworkbook from opening? I Guess the new Book1 is still referencing the MAINworkbook.
Would appreciate your help on this matter.
Regards
My issue might be easy for some of you since I am not that experienced with Macros.
Here is a description of my project.
My initial Workbook, called MAINworkbook has one main visible sheet where user launches a userform. (20 other sheets are hidden)
Userform has 20 checkboxes where each is linked to one sheet. User will check whatever checkbox and after hitting enter;
1) A new workbook will be created Book1
2) Hidden sheets associated to every box that was checked will become visible and copied to the new workbook Book1
3) MAINworkbook will close
This was working perfectly fine.
However, I have recently did some updates and my VBA hasn't been working well.
For every hidden sheet, I have added a command button. When this button is clicked, a print preview of the page will show.
When user is running the actual VBA:
1) A new workbook will be created Book1
2) Hidden sheets associated to every box that was checked will become visible and copied to the new workbook Book1
3) Initial MAINworkbook will close
4) When user clicks on this new command button, the print preview setup will show up.
5) After closing that print preview page, the MAINworkbook will open again.
How to prevent that MAINworkbook from opening? I Guess the new Book1 is still referencing the MAINworkbook.
Would appreciate your help on this matter.
Regards