From: Dave Peterson on 19 Jan 2006 14:44 Is the workbook protected? I'm out of guesses. Dina wrote: > > I have a situation where I am copying files from a "common files" folder into > individual folders. Then I have to change the links to refer to the newly > copied files within each folder. I keep getting "Runtime error '1004' > Method 'ChangeLink' of object '_Workbook' failed" > > It doesn't seem to matter whether I use absolute addresses or variables. > I've tried the following: > > ActiveWorkbook.ChangeLink Name:= _ > "C:\BudDataRun\Common Files\INPUTSHEETABA-GF.xls", NewName:= _ > "C:\BudDataRun\Gen Fund Budget\N-E0011\INPUTSHEETABA-GF.xls", Type:= _ > xlExcelLinks > (The macro recorder used the Name:= and NewName:= labels) > > 'ActiveWorkbook.ChangeLink "C:\BudDataRun\Common > Files\INPUTSHEETABA-GF.xls", _ > '"INPUTSHEETABA-GF.xls", xlExcelLinks > > > 'ActiveWorkbook.ChangeLink RootDirectoryName & CommonFolder & > ABAFile, _ > 'RootDirectoryName & FilePathName & FilePathName2 & ABAFile, > xlExcelLinks > > All variations get the same error message. > I'm running on Windows XP if that makes any difference. -- Dave Peterson
From: Dina on 19 Jan 2006 14:52 Thanks for trying. I've been working on this for 2 days. I had this (or one like it) working last year on my old computer. I was running Windows 2000. This year I have Windows XP. The only thing I can think of is that there is a conflict. The OS sometimes does wonky things to VBA commands. What forum would I go to for expert help with this kind of conflict? "Dave Peterson" wrote: > Is the workbook protected? > > I'm out of guesses. > > Dina wrote: > > > > I have a situation where I am copying files from a "common files" folder into > > individual folders. Then I have to change the links to refer to the newly > > copied files within each folder. I keep getting "Runtime error '1004' > > Method 'ChangeLink' of object '_Workbook' failed" > > > > It doesn't seem to matter whether I use absolute addresses or variables. > > I've tried the following: > > > > ActiveWorkbook.ChangeLink Name:= _ > > "C:\BudDataRun\Common Files\INPUTSHEETABA-GF.xls", NewName:= _ > > "C:\BudDataRun\Gen Fund Budget\N-E0011\INPUTSHEETABA-GF.xls", Type:= _ > > xlExcelLinks > > (The macro recorder used the Name:= and NewName:= labels) > > > > 'ActiveWorkbook.ChangeLink "C:\BudDataRun\Common > > Files\INPUTSHEETABA-GF.xls", _ > > '"INPUTSHEETABA-GF.xls", xlExcelLinks > > > > > > 'ActiveWorkbook.ChangeLink RootDirectoryName & CommonFolder & > > ABAFile, _ > > 'RootDirectoryName & FilePathName & FilePathName2 & ABAFile, > > xlExcelLinks > > > > All variations get the same error message. > > I'm running on Windows XP if that makes any difference. > > -- > > Dave Peterson >
From: Dave Peterson on 19 Jan 2006 15:02 I'd stay here and see if anybody else could guess. Dina wrote: > > Thanks for trying. > > I've been working on this for 2 days. I had this (or one like it) working > last year on my old computer. I was running Windows 2000. This year I have > Windows XP. The only thing I can think of is that there is a conflict. The > OS sometimes does wonky things to VBA commands. > > What forum would I go to for expert help with this kind of conflict? > > "Dave Peterson" wrote: > > > Is the workbook protected? > > > > I'm out of guesses. > > > > Dina wrote: > > > > > > I have a situation where I am copying files from a "common files" folder into > > > individual folders. Then I have to change the links to refer to the newly > > > copied files within each folder. I keep getting "Runtime error '1004' > > > Method 'ChangeLink' of object '_Workbook' failed" > > > > > > It doesn't seem to matter whether I use absolute addresses or variables. > > > I've tried the following: > > > > > > ActiveWorkbook.ChangeLink Name:= _ > > > "C:\BudDataRun\Common Files\INPUTSHEETABA-GF.xls", NewName:= _ > > > "C:\BudDataRun\Gen Fund Budget\N-E0011\INPUTSHEETABA-GF.xls", Type:= _ > > > xlExcelLinks > > > (The macro recorder used the Name:= and NewName:= labels) > > > > > > 'ActiveWorkbook.ChangeLink "C:\BudDataRun\Common > > > Files\INPUTSHEETABA-GF.xls", _ > > > '"INPUTSHEETABA-GF.xls", xlExcelLinks > > > > > > > > > 'ActiveWorkbook.ChangeLink RootDirectoryName & CommonFolder & > > > ABAFile, _ > > > 'RootDirectoryName & FilePathName & FilePathName2 & ABAFile, > > > xlExcelLinks > > > > > > All variations get the same error message. > > > I'm running on Windows XP if that makes any difference. > > > > -- > > > > Dave Peterson > > -- Dave Peterson
From: whylite on 16 Feb 2006 22:55 Did you ever figure this out. I am having the same problem? -- Thanks! Shane W "Dave Peterson" wrote: > I'd stay here and see if anybody else could guess. > > > > Dina wrote: > > > > Thanks for trying. > > > > I've been working on this for 2 days. I had this (or one like it) working > > last year on my old computer. I was running Windows 2000. This year I have > > Windows XP. The only thing I can think of is that there is a conflict. The > > OS sometimes does wonky things to VBA commands. > > > > What forum would I go to for expert help with this kind of conflict? > > > > "Dave Peterson" wrote: > > > > > Is the workbook protected? > > > > > > I'm out of guesses. > > > > > > Dina wrote: > > > > > > > > I have a situation where I am copying files from a "common files" folder into > > > > individual folders. Then I have to change the links to refer to the newly > > > > copied files within each folder. I keep getting "Runtime error '1004' > > > > Method 'ChangeLink' of object '_Workbook' failed" > > > > > > > > It doesn't seem to matter whether I use absolute addresses or variables. > > > > I've tried the following: > > > > > > > > ActiveWorkbook.ChangeLink Name:= _ > > > > "C:\BudDataRun\Common Files\INPUTSHEETABA-GF.xls", NewName:= _ > > > > "C:\BudDataRun\Gen Fund Budget\N-E0011\INPUTSHEETABA-GF.xls", Type:= _ > > > > xlExcelLinks > > > > (The macro recorder used the Name:= and NewName:= labels) > > > > > > > > 'ActiveWorkbook.ChangeLink "C:\BudDataRun\Common > > > > Files\INPUTSHEETABA-GF.xls", _ > > > > '"INPUTSHEETABA-GF.xls", xlExcelLinks > > > > > > > > > > > > 'ActiveWorkbook.ChangeLink RootDirectoryName & CommonFolder & > > > > ABAFile, _ > > > > 'RootDirectoryName & FilePathName & FilePathName2 & ABAFile, > > > > xlExcelLinks > > > > > > > > All variations get the same error message. > > > > I'm running on Windows XP if that makes any difference. > > > > > > -- > > > > > > Dave Peterson > > > > > -- > > Dave Peterson >
First
|
Prev
|
Pages: 1 2 Prev: Setting an Essbase Option using code Next: Pivot Table version (xlPivotTableVersion12) |