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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It seems to me that if all other workbooks are functioning as designed, that
the one which does not function properly has a different condition than the others. If that is true, then that system would require individual analysis to determine what is different to cause the cells to reference the ftp link as part of the workbook reference. Apparently the basic code works. "pdberger" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the prompt response. Unfortunately, she's in Alaska so I can't
just wander over. Things worked fine until, for no reason that we can figure, it just blew up and rewrote everything. So perhaps two questions: 1) Is there some way I can protect the sheets, cells, and graphs so that the only possible way to change them is manually? 2) In looking for something different in her setup, is there any place we can start first? Thanks in advance. "JLGWhiz" wrote: It seems to me that if all other workbooks are functioning as designed, that the one which does not function properly has a different condition than the others. If that is true, then that system would require individual analysis to determine what is different to cause the cells to reference the ftp link as part of the workbook reference. Apparently the basic code works. "pdberger" wrote: 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. |
Reply |
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 |