R
ruic
'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
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
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
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