Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I am trying to get my code to open a workbook, then update the links and then close the workbook again. It is working okay until I get to the line "Windows("http://knet/sites/fapas/risk/InformationSecurity/IS Documents/Plan/Statement of Applicability.xls").Activate" in the code. It is giving me the message Run-time error '9': Subscript out of range I have added the code below and put the troublesome line in brackets. Extra info - the % in the filename in the initial bit where I open the file are because it is on sharepoint and replaces spaces with % Could anyone help with this? Private Sub Workbook_Open() MsgBox "Click on the statement to provide assurance on the IS controls in place", vbInformation Workbooks.Open Filename:= _ "http://knet/sites/fapas/risk/InformationSecurity/IS%20Documents/Plan/Statement%20of%20Applicability.xls" Windows("IS register new one!.xls").Activate Workbooks("IS Register new one!.xls").Activate ActiveWorkbook.UpdateLink Name:= _ "http://knet/sites/fapas/risk/InformationSecurity/IS Documents/Plan/Statement of Applicability.xls" _ , Type:=xlExcelLinks ((((Windows("http://knet/sites/fapas/risk/InformationSecurity/IS Documents/Plan/Statement of Applicability.xls").Activate)))) ActiveWorkbook.Close End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow Opening & Odd Closing | New Users to Excel | |||
Closing a workbook upon opening another | New Users to Excel | |||
Opening/Closing a lot of groupings via VBA | Excel Programming | |||
Opening and closing workbook with VBA... | Excel Programming | |||
closing excel after closing a workbook | Excel Programming |