![]() |
Creating workbook from a "template"
Hello! I'm quite a novice in programming VBA so I hope you've got somethin for me. :) My task is to create some kind of template in excel (that contain formal informations), then search other documents for different infos insert it all in the template and save the template with a differen name. The search part is ok, but how do I open the template (standard) fil and save it with a new name. Hope you can help me. Best regards /Tommy, Denmar -- Tm ----------------------------------------------------------------------- Tmf's Profile: http://www.excelforum.com/member.php...fo&userid=2498 View this thread: http://www.excelforum.com/showthread.php?threadid=38517 |
Creating workbook from a "template"
Tmf,
By 'template' I presume you mean you are using a standard .xls file as a template, in which case I would simply copy the file before you open it- something like this Dim wbCopy as Workbook FileCopy "C:\Standard Template.xls", "C:\NewFile.xls" Set wbCopy = Application.Workbooks.Open("C:\NewFile.xls") wbCopy.Worksheets("Sheet1").Range("A1").Value = 42 'etc... Cheers, Dave "Tmf" wrote: Hello! I'm quite a novice in programming VBA so I hope you've got something for me. :) My task is to create some kind of template in excel (that contains formal informations), then search other documents for different infos, insert it all in the template and save the template with a different name. The search part is ok, but how do I open the template (standard) file and save it with a new name. Hope you can help me. Best regards /Tommy, Denmark -- Tmf ------------------------------------------------------------------------ Tmf's Profile: http://www.excelforum.com/member.php...o&userid=24985 View this thread: http://www.excelforum.com/showthread...hreadid=385170 |
All times are GMT +1. The time now is 09:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com