automatically create another spreadsheet from template
I have a master spreadsheet that I use to track problems. Each problem
is given a reference. The first column/field in the master problem spreadsheet is this reference number. There are also a number of other columns that record data for but these are irrelevant to my question. Currently when I create a new problem entry in the spreadsheet, I assign a reference, create another spreadsheet from a template and name it according to this problem reference. Further specific details regarding this problem are tracked in this secondary spreadsheet. My question is this. Is it possible to automate this? When I create an entry in the master spreadsheet, after I insert the new reference in the first field, it would be great if a vbscript could take a copy of the template (template is in the same directory as the master spreadsheet), name it according to the reference just given, and place a link around the reference number in the first column of the master spreadsheet that can then load up the secondary spreadsheet when clicked. I just don't know where to start. |
automatically create another spreadsheet from template
Joshua
record what you do manually using the Macro Recorder. Then put that code into the WorkSheet_Change event in your Master worksheet. If you search the archives for WorkSheet_Change you should find lots of examples of limiting the change to column A. For example: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Columns("A")) Is Nothing Then Exit Sub MsgBox "Change to Column A" ' your code ... End Sub Regards Trevor "Joshua" wrote in message om... I have a master spreadsheet that I use to track problems. Each problem is given a reference. The first column/field in the master problem spreadsheet is this reference number. There are also a number of other columns that record data for but these are irrelevant to my question. Currently when I create a new problem entry in the spreadsheet, I assign a reference, create another spreadsheet from a template and name it according to this problem reference. Further specific details regarding this problem are tracked in this secondary spreadsheet. My question is this. Is it possible to automate this? When I create an entry in the master spreadsheet, after I insert the new reference in the first field, it would be great if a vbscript could take a copy of the template (template is in the same directory as the master spreadsheet), name it according to the reference just given, and place a link around the reference number in the first column of the master spreadsheet that can then load up the secondary spreadsheet when clicked. I just don't know where to start. |
All times are GMT +1. The time now is 03:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com