![]() |
Trying again for workbook formula updates
Okay, a bit less long winded this time. Can anyone provide me with code
for opening up an old workbook, making a copy of a worksheet in that workbook and saving it within that workbook as "old worksheet"? That much will get me started. After that I will work on code for updating formulas in the original worksheet. Thank you. |
Option Explicit
Sub auto_open() Dim newWks As Worksheet With ThisWorkbook .Worksheets("sheet1").Copy after:=.Worksheets(.Worksheets.Count) End With Set newWks = ActiveSheet newWks.Name = "Old Worksheet" End Sub It'll work until you have an existing worksheet named "old worksheet". Then it'll crash on that .name command. Paulie wrote: Okay, a bit less long winded this time. Can anyone provide me with code for opening up an old workbook, making a copy of a worksheet in that workbook and saving it within that workbook as "old worksheet"? That much will get me started. After that I will work on code for updating formulas in the original worksheet. Thank you. -- Dave Peterson |
Thank you Dave!
|
All times are GMT +1. The time now is 04:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com