Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a few workbooks on our server that need to be opened, links updated,
saved and then closed again. It has to be done in a specific sequence and each workbook has the same writeres password. I'm thinking along the lines of having a master workbook open containing the macro. When I leave work in the evening I can start the Macro and have all the workbooks updated by the next morning. I have been testing this on one book only. It opens and updates but it doesn't want to close it. I don't know much about VBA and sort of been figuring things out as I go along. This is what I've been trying: Sub OpenUpdateClose() ' ' OpenUpdateClose Macro ' Opens all workbooks, Updates them then saves and closes them ' ' Keyboard Shortcut: Ctrl+Shift+O ' Dim wbk As Workbook Application.DisplayAlerts = False Set wbk = Workbooks.Open(Filename:="filename1.xls", _ UpdateLinks:=True, _ writeresPassword:="password") With wbk .Save .Close End With Set wbk = Nothing End Sub Thanks in advance for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to close all open workbooks in Excel 2007 | Setting up and Configuration of Excel | |||
Open and Close a Workbook to Update Links | Excel Discussion (Misc queries) | |||
Workbooks Close, but window stays open | Excel Discussion (Misc queries) | |||
Open Close workbooks | Excel Discussion (Misc queries) | |||
Can you update links between workbooks without them both open? | Excel Discussion (Misc queries) |