Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to open each file from the folder and save again

'Set a pointer to the workbook you want to open
Set Wb = Workbooks.Open(Module1.CurrentDrive & "\Share\" & Module1.CurrentYear & "\" & AccountsLB.List(I), False, False)

'Make some changes to the work book'
Wb.Worksheets("January").Range("A1").Value = TitleOfBook

'Save your changes and close the workbook
Wb.Save
Wb.Close False

'Clean up the pointer otherwise memory doesn't get relased
Set Wb = Nothing

--
Rui

"L.K." wrote in message ...
Dear All,

I have problem to write macro. it should be simple.
I want to open each excel file from the specific folder, do some operations (it is Edit-Links and break links) and save file again with the same name.

I recorded macro how to do operations after opening file but I couldn't how to cycle opening of files and save them.

Thank you for help.
Lado
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to open each file from the folder and save again

See
http://www.rondebruin.nl/copy4.htm

You can change the Copy code to your code

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"L.K." wrote in message ...
Dear All,

I have problem to write macro. it should be simple.
I want to open each excel file from the specific folder, do some operations (it is Edit-Links and break links) and save file again with the same name.

I recorded macro how to do operations after opening file but I couldn't how to cycle opening of files and save them.

Thank you for help.
Lado
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How to open each file from the folder and save again

Dear All,

I have problem to write macro. it should be simple.
I want to open each excel file from the specific folder, do some operations (it is Edit-Links and break links) and save file again with the same name.

I recorded macro how to do operations after opening file but I couldn't how to cycle opening of files and save them.

Thank you for help.
Lado
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How to open each file from the folder and save again

Thank you!
It's really helpful.

Kindly,
Lado

"Ron de Bruin" wrote in message ...
See
http://www.rondebruin.nl/copy4.htm

You can change the Copy code to your code

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"L.K." wrote in message ...
Dear All,

I have problem to write macro. it should be simple.
I want to open each excel file from the specific folder, do some operations (it is Edit-Links and break links) and save file again with the same name.

I recorded macro how to do operations after opening file but I couldn't how to cycle opening of files and save them.

Thank you for help.
Lado
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
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
open and save an entire folder SusanWS Excel Discussion (Misc queries) 1 June 15th 06 03:56 PM
Need code to save file to new folder, erase from old folder Ron M. Excel Discussion (Misc queries) 1 February 24th 06 06:02 PM
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM


All times are GMT +1. The time now is 07:04 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"