Hi there
"VERY" new to VB coding, in Excel but trying to do the following:
Initial Workbook set up with 3 worksheets:
1. Menu sheet with project start buttons
2 First template sheet - DataTable sheet
3. Second template sheet - Graph sheet
Now, the sequence is:
1. Button on menu sheet creates a copy of a datatable spreadsheet (sheet #2) for the user to fill in - will prompt user to rename via messagebox - all ok
2. Button on new DataTable sheet (which has been renamed by user) will then ask to generate a copy the Graph Sheet (sheet #3) once data has been entered.
No problem generating a copy of the GraphTable sheet, but want to rename this automatically to whatever name the user has given to the DataTable sheet, followed by '-Graph'
As the DataTable sheet is not a constant sheet (user can create multiple DataSheets for various uses and rename them, so even sheetcodename is not known in advance.)
So how would I be able to have the GraphTable renamed automatically at time of copying the graph template in this case?
I know that adding & "-Graph" behind the ActiveSheet.Name once the sheet has been copied will add the extension, but no clue as to how to grab the initial TableData sheet name which had the button that was pressed to create this new sheet.
User can create DataTable Sheet and subsequent Graph sheets as many times as required for different data, so wanted to make sure that it was obvious which graph sheet belonged to which datatable sheet by having the same name followed by '-graph'
Assistance appreciated!
Bookmarks