Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing Workbook Name in Formula Russ Excel Worksheet Functions 4 May 14th 08 04:48 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Referencing other workbook. [email protected] Excel Worksheet Functions 1 September 4th 06 05:59 PM
Referencing a different Workbook Ken Excel Worksheet Functions 8 November 24th 05 01:20 AM
Referencing another Workbook Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 6th 05 07:16 PM


All times are GMT +1. The time now is 08:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"