Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macro help
Hi
I have written a macro below to go through a list, copy each item in the list, open a template and paste the item on the template, close & save with the item as part of the file name. Could you help me ammend the code to speed it up and if possible to create the file with the item on it but without opening and saving & closing it. Thanks in advance. Sub CreateWrkbk() Dim x As String, z As String Application.ScreenUpdating = False StartTime = Timer Range("A1").Select Do Until ActiveCell.Offset(1, 0) = "" ActiveCell.Offset(1, 0).Select x = ActiveCell.Value ' Workbooks.Add Set WkBkTmpOpn = Workbooks.Add(template:="C:\Documents and Settings\nc1\Application Data\Microsoft\Templates\TAS template.xlt") Range("K4") = x ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\nc1\Desktop\TAS\" _ & x & " Time allocation schedule" ActiveWindow.Close Loop EndTime = Timer z = Format(EndTime - StartTime, "0.0") MsgBox z Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
automatic macro update | Excel Worksheet Functions | |||
Date macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions |