Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing a range from another workbook
Dim sPath as string, sName as String, sh as worksheet, bk as workbook
sPath = "C:\windows\temp\" application.Screenupdating = False sName = "savedfilename.xls" set sh = activesheet set bk = workbooks.open(sPath & sName) Activesheet.cells.copy sh.cells.PasteSpecial xlformats bk.close savechanges:=false Application.ScreenUpdating = True -- Regards, Tom Ogilvy "Gary" wrote in message ... I am saving a spreadsheet to the "TEMP" folder everytime a user runs a "format" macro that I created. What I want to do is when a user mistakenly formats the sheet They can run a macro that will automatically restore the "Formatted" sheet with the sheet that was saved into the "TEMP" folder. Thanks for any input. Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing Workbook Name in Formula | Excel Worksheet Functions | |||
Referencing a named range based upon Range name entry in cell | Excel Worksheet Functions | |||
Referencing other workbook. | Excel Worksheet Functions | |||
Referencing a different Workbook | Excel Worksheet Functions | |||
Referencing another Workbook | Excel Discussion (Misc queries) |