LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to code the Macro to save and close a file?

Workbooks.Open Filename:="C:\Files\1.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWindow.Close
The command "ActiveWindow" cannot be performed, does anyone have any
suggestions on how change the code for specific file under specific
directory, such as
Save "C:\Files\1.xls" to replace the code ActiveWorkbook.Save
Close "C:\Files\1.xls" to replace the code ActiveWorkbook.Close

Thank for any suggestions
Eric

 
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
Macro to save & close all opened files James A Excel Discussion (Misc queries) 1 December 23rd 06 05:16 AM
VBA Code to kick off macro when workbook command to close is initi zulfer7 Excel Discussion (Misc queries) 2 June 23rd 06 08:04 PM
Macro VBA code to name Save-As file Dolores Excel Worksheet Functions 7 December 28th 05 11:24 PM
File close excel does not ask me to save changes Cathy Humphreys Excel Discussion (Misc queries) 2 June 13th 05 08:48 PM
I can't save a file unless I close all excel instances or it's th. BVBOWES Excel Discussion (Misc queries) 0 April 26th 05 09:20 PM


All times are GMT +1. The time now is 02:42 PM.

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

About Us

"It's about Microsoft Excel"