Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
open and save an entire folder | Excel Discussion (Misc queries) | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
open file from folder save in new folder | Excel Programming |