Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good morning --
On opening, my workbook runs a sub called 'Reflinks' (listed below) that opens a file on a company server and downloads a lot of reference values. About 20 managers have copies of the workbook in offices across the northwest, and they all open up and retrieve this reference data. The workbook consists of two data pages, three calculation pages, and one final 'presentation' page. There are lots of references between the pages, as well as to pull the reference data from our server. One of the managers opened up her workbook, and got an error code 1004 -- 'the specified dimension is not valid for the current chart type'. Then, EVERY cell on EVERY page that had a reference to another page got changed to look for the data from the server, rather than the correct page in the workbook. So, if the formula said "='Page1'!A1", it was automatically changed to 'ftp://[Instrument Panel Reference Data]'Page1'!A1"! For hundreds of cells. And all the calculation cells on all pages are password-protected, but it still happened anyway. Here's the code: Sub RefLinks() Dim wkb As String 'Refresh Links Sheets("Other Calculations").Select ActiveSheet.Unprotect ("MedMan") wkb = ActiveWorkbook.Name ' ActiveWorkbook.ChangeLink Name:= _ ' /Peter/Instrument Panel Reference Data.xls" _ ' , NewName:="Instrument Panel Reference Data.xls", Type:=xlExcelLinks ActiveWorkbook.ChangeLink Name:="Instrument Panel Reference Data.xls", _ NewName:="Instrument Panel Reference Data.xls", Type:=xlExcelLinks Workbooks.Open Filename:= _ "ftp://mariantoo.medman.com/Peter/Instrument Panel Reference Data.xls" Windows(wkb).Activate ActiveSheet.Protect ("MedMan"), DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub Thanks in advance for any help you can provide. I don't relish fixing 100+ cells, especially if I don't know why it blew up in the first place. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shell Command Fails (sometimes) | Excel Programming | |||
Workbook_Open event fails to fire | Excel Programming | |||
Workbook_open event disabled by manual calc command | Excel Programming | |||
Excel 97 fails to execute Workbook_Open() on New XLS from Template (FYI) | Excel Programming | |||
ADO Open command fails on multiple SQL functions | Excel Programming |