Hi all! Before I start, I just want to say my knowledge of VBA is very basic. I'm trying to learn by recording macros.
I currently have a workbook with 5 sheets: 'New project', 'Template_General', 'Template_Budget', 'Template-Planning' and 'Template-Notes'.
On the sheet 'New project' I ask users to write a projectcode in cell A5. The projectcode consists of a combination of two letters and three numbers (e.g. 'AB001'). On this sheet I would like to add a button that performs multiple steps:
1. Copy the sheet 'Template_General'
2. Rename this sheet to the last three characters of the projectname (as stated in cell A5 on the 'New project' sheet) & the word 'General'.
3. Copy the projectcode from the 'New project' sheet in cell A5 and paste this value to the newly created sheet in cell D7.
4. Steps 1-3 for the other templates (budget, planning and notes).
5. Clear cell A5 on sheet 'New project'
6. Navigate to the newly created 'General' sheet, cell A1.
Optionally, I would like to show a custom error message if the sheetname already exists.
Any help or advise is much appreciated!
I currently have a workbook with 5 sheets: 'New project', 'Template_General', 'Template_Budget', 'Template-Planning' and 'Template-Notes'.
On the sheet 'New project' I ask users to write a projectcode in cell A5. The projectcode consists of a combination of two letters and three numbers (e.g. 'AB001'). On this sheet I would like to add a button that performs multiple steps:
1. Copy the sheet 'Template_General'
2. Rename this sheet to the last three characters of the projectname (as stated in cell A5 on the 'New project' sheet) & the word 'General'.
3. Copy the projectcode from the 'New project' sheet in cell A5 and paste this value to the newly created sheet in cell D7.
4. Steps 1-3 for the other templates (budget, planning and notes).
5. Clear cell A5 on sheet 'New project'
6. Navigate to the newly created 'General' sheet, cell A1.
Optionally, I would like to show a custom error message if the sheetname already exists.
Any help or advise is much appreciated!