How can you access hidden published ms-project .mpp files - excel

I was writing a simple script in VBA for batch updating project info posted on Project Web App. I've stumbled on a problem which seems unsolvable to me though, opening projects programatically through FileOpenEx method is working only on a fraction of them.
I found out when opening files manually through MS Project's file explorer that most of the projects are hidden until you pick "Show list of all projects" option, which appears on the top of the list of .mpp files to choose from. After picking this option, all projects unavailable to open through macro show up after a few seconds of loading.
I have no clue on how to tackle this problem, maybe connecting to the SharePoint database in a different, more direct way would help? I'm posting below a few lines of code responsible for opening the projects.
Dim myMPP As MSProject.Application
Set myMPP = CreateObject("Msproject.Application")
myMPP.Visible = True
Dim projectName, fpath As String
projectName = "ExampleProject"
fpath = "<>\" & projectName
myMPP.FileOpenEx Name:=fpath, ReadOnly:=True, openPool:=pjDoNotOpenPool
Set mpp = myMPP.ActiveProject

Solution to the problem was opening MS Project manually before running any macros. Instances of Project opened programatically seem to be able to operate only on cached projects.

Related

VBA: Using Filesystemobject to locate workbook path

I am using the GetFolder method within FileSystemObject to locate the path of a workbook. I am then using the path to search for filenames in the same directory and extract information from files with certain names using some parameters. It works fine when working from the windows directory, however the company I work at uses Sharepoint. When accessing the Excel-workbook from Sharepoint this method no longer works. The workbook opens fine, but when I run the Macro I get an error message.
Code in question:
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(Application.Thisworkbook.Path)
Error: Unable to find path (Swedish literal error message: Det går inte att hitta filsökvägen)
Anyone with a clue as to what to do about this? I've tried some alternate ways to get the path but nothing has worked thus far.
Perhaps it would be cleaner use WinHttp object to get the SP library's contents via SharePoint REST API. It's how Microsoft wants you to approach this problem anyway. Refer to this article and SP REST API Documentation.
There is also a dirty way to this we found a few years ago. If you sync a library's contents to your File Explorer, there's a good chance FSO could work. But keep in mind that the synced library is better kept up-to-date. Also, SharePoint can handle much longer paths than FSO, so when hierarchies get deep, you'll only get the first 250-something characters.
Therefore, I'd use the API.

Add ActiveX component to Excel Spreadsheet [duplicate]

I have some Excel worksheets that use ActiveX checkboxes to control certain activity. They worked recently but today started to give errors. I was alerted to this by a colleague, but it was still working on my computer. I checked his version of Excel against mine and his was newer. I noticed there were new Windows updates, so I did the update. After I applied pending updates, it now no longer works on my computer. I cannot check the ActiveX checkboxes any longer, and, as a part of trying to debug, it appears I cannot even add an ActiveX control to any worksheet, even a new worksheet, any more. I get an error dialog that says, "Cannot insert object." (I can still add form controls, just not ActiveX.) Anyone else experiencing this after a recent update? Any suggestions?
Thanks,
Mike
From other forums, I have learned that it is due to the MS Update and that a good fix is to simply delete the file MSForms.exd from any Temp subfolder in the user's profile. For instance:
C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd
C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd
C:\Users\[user.name]\AppData\Local\Temp\Word8.0\MSForms.exd
Of course the application (Excel, Word...) must be closed in order to delete this file.
Here is the best answer that I have found on the Microsoft Excel Support Team Blog
For some users, Forms Controls (FM20.dll) are no longer working as
expected after installing December 2014 updates. Issues are
experienced at times such as when they open files with existing VBA
projects using forms controls, try to insert a forms control in to a
new worksheet or run third party software that may use these
components.
You may received errors such as:
"Cannot insert object" "Object library invalid or contains references
to object definitions that could not be found"
Additionally, you may be unable to use or change properties of an
ActiveX control on a worksheet or receive an error when trying to
refer to an ActiveX control as a member of a worksheet via code.
Steps to follow after the update:
To resolve this issue, you must delete the cached versions of the
control type libraries (extender files) on the client computer. To do
this, you must search your hard disk for files that have the ".exd"
file name extension and delete all the .exd files that you find. These
.exd files will be re-created automatically when you use the new
controls the next time that you use VBA. These extender files will be
under the user's profile and may also be in other locations, such as
the following:
%appdata%\Microsoft\forms
%temp%\Excel8.0
%temp%\VBE
Scripting solution:
Because this problem may affect more than one machine, it is also
possible to create a scripting solution to delete the EXD files and
run the script as part of the logon process using a policy. The script
you would need should contain the following lines and would need to be
run for each USER as the .exd files are USER specific.
del %temp%\vbe\*.exd
del %temp%\excel8.0\*.exd
del %appdata%\microsoft\forms\*.exd
del %appdata%\microsoft\local\*.exd
del %appdata%\Roaming\microsoft\forms\*.exd
del %temp%\word8.0\*.exd
del %temp%\PPT11.0\*.exd
Additional step:
If the steps above do not resolve your issue, another step that can be
tested (see warning below):
On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.
Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile
VBAProject.
Save and reopen the file. Test for resolution. If resolved, provide this updated project to additional users.
Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will
also need to have the updates applied on their systems and .exd files
removed as well.
If this does not resolve your issue, it may be a different issue and
further troubleshooting may be necessary.
Microsoft is currently working on this issue. Watch the blog for
updates.
Source
It was KB2553154. Microsoft needs to release a fix. As a developer of Excel applications we can't go to all our clients computers and delete files off them. We are getting blamed for something Microsoft caused.
I'm an Excel developer, and I definitely felt the pain when this happened. Fortunately, I was able to find a workaround by renaming the MSForms.exd files in VBA even when Excel is running, which also can fix the issue. Excel developers who need to distribute their spreadsheets can add the following VBA code to their spreadsheets to make them immune to the MS update.
Place this code in any module.
Public Sub RenameMSFormsFiles()
Const tempFileName As String = "MSForms - Copy.exd"
Const msFormsFileName As String = "MSForms.exd"
On Error Resume Next
'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd file
RenameFile Environ("TEMP") & "\Excel8.0\" & msFormsFileName, Environ("TEMP") & "\Excel8.0\" & tempFileName
'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd file
RenameFile Environ("TEMP") & "\VBE\" & msFormsFileName, Environ("TEMP") & "\VBE\" & tempFileName
End Sub
Private Sub RenameFile(fromFilePath As String, toFilePath As String)
If CheckFileExist(fromFilePath) Then
DeleteFile toFilePath
Name fromFilePath As toFilePath
End If
End Sub
Private Function CheckFileExist(path As String) As Boolean
CheckFileExist = (Dir(path) <> "")
End Function
Private Sub DeleteFile(path As String)
If CheckFileExist(path) Then
SetAttr path, vbNormal
Kill path
End If
End Sub
The RenameMSFormsFiles subroutine tries to rename the MSForms.exd files in the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\ and C:\Users\[user.name]\AppData\Local\Temp\VBE\ folders to MSForms - Copy.exd.
Then call the RenameMSFormsFiles subroutine at the very beginning of the Workbook_Open event.
Private Sub Workbook_Open()
RenameMSFormsFiles
End Sub
The spreadsheet will try to rename the MSForms.exd files when it opens. Obviously, this is not a perfect fix:
The affected user will still experience the ActiveX control errors when running the VBA code the very first time opening the spreadsheet. Only after executing the VBA code once and restarting Excel, the issue is fixed. Normally when a user encounters a broken spreadsheet, the knee-jerk reaction is to close Excel and try to open the spreadsheet again. :)
The MSForms.exd files are renamed every time the spreadsheet opens, even when there's no issue with the MSForms.exd files. But the spreadsheet will work just fine.
At least for now, Excel developers can continue to distribute their work with this workaround until Microsoft releases a fix.
I've posted this solution here.
With Windows 8.1 I couldn't find any .exd files using windows search. On the other hand, a cmd command dir *.exd /S found the one file on my system.
Advice in KB and above didn't work for me. I discovered that if one Excel 2007 user (with or without the security update; not sure of exact circumstances that cause this) saves the file, the original error returns.
I discovered that the fastest way to repair the file again is to delete all the VBA code. Save. Then replace the VBA code (copy/paste). Save. Before attempting this, I delete the .EXD files first, because otherwise I get an error on open.
In my case, I cannot upgrade/update all users of my Excel file in various locations. Since the problem comes back after some users save the Excel file, I am going to have to replace the ActiveX control with something else.
The best source of information and updates on this issue I could find is in the TechNet Blogs » The Microsoft Excel Support Team Blog (as mentioned):
Form Controls stop working after December 2014 Updates (Updated March 10, 2015)
On March 2015 a hotfix was released in addition to the automated fix-it and manual instructions, and it's available on Windows Update as well.
The latest update and fix from Microsoft:
3025036 "Cannot insert object" error in an ActiveX custom Office solution after you install the MS14-082 security update
STATUS: Update March 10, 2015:
Hotfixes for this issue have been released in the March 2015 Updates for Office 2007, 2010 & 2013.
General info about the problem:
For some users, Form Controls (FM20.dll) are no longer working as expected after installing MS14-082 Microsoft Office Security Updates for December 2014. Issues are experienced at times such as when they open files with existing VBA projects using forms controls, try to insert a forms control in to a new worksheet or run third party software that may use these components.
https://technet.microsoft.com/en-us/library/security/ms14-082.aspx
You may receive errors such as:
"Cannot insert object"; "Object library invalid or contains references to object definitions that could not be found"; "The program used to create this object is Forms. That program is either not installed on your computer or it is not responding. To edit this object, install Forms or ensure that any dialog boxes in Forms are closed." [...]
Additionally, you may be unable to use or change properties of an ActiveX control on a worksheet or receive an error when trying to refer to an ActiveX control as a member of a worksheet via code.
Manual and additional solutions:
Scripting solution:
Because this problem may affect more than one machine, it is also possible to create a scripting solution to delete the EXD files and run the script as part of the logon process using a policy. The script you would need should contain the following lines and would need to be run for each USER as the .exd files are USER specific.
del %temp%\vbe\*.exd
del %temp%\excel8.0\*.exd
del %appdata%\microsoft\forms\*.exd
del %appdata%\microsoft\local\*.exd
del %temp%\word8.0\*.exd
del %temp%\PPT11.0\*.exd
Additional step:
If the steps above do not resolve your issue, another step that can be tested (see warning below):
On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.
Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.
Save and reopen the file. Test for resolution.
If resolved, provide this updated project to additional users.
Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will also need to have the updates applied on their systems and .exd files removed as well.
Simplified instructions for end-users. Feel free to copy/paste the following.
Here’s how to fix the problem when it comes up:
Close all your Office programs and files.
Open Windows Explorer and type %TEMP% into the address bar, then press Enter. This will take you into the system temporary folder.
Locate and delete the following folders: Excel8.0, VBE, Word8.0
Now try to use your file again, it shouldn't have any problems.
You might need to wait until the problem occurs in order for this fix to work. Applying it prematurely (before the Windows Update gets installed on your system) won't help.
I did finally find this answer on the official Microsoft KB:
http://support.microsoft.com/kb/3025036/EN-US
No new information here than what we have in previous answers, but at least it acknowledges that Microsoft is aware of the issue.
I know many answers have already been posted for this, but neither one answer independently worked for my site. So here is what worked for me:
Step 1: Uninstall the following updates - KB2920789, KB2920790, KB2920792, KB2920793, KB2984942, KB2596927
Step 2: Hide these updates so they do not get installed on subsequent reboots
Step 3: Delete folder Excel8.0 from C:\Users\<>\AppData\Local\Temp
Step 4: Restart workstatiion (I would also make sure the above mentioned KBs did not inadvertently get applied)
I want to provide an answer that worked as the only thing for me (I realize that I might be the only one ever). I had in one macro that I was calling using the ribbon. It had the following code:
colStore = new Collection
I wasn't aware that it throws an error so I was baffled and tried everything in here. The button just stopped working and I couldn't get it to work. When I noticed the error and corrected it to:
Set colStore = new Collection
It started working again. Absolutely strange if you ask me but maybe it helps someone out there who was as desperate as me.

Microsoft Excel ActiveX Controls Disabled?

I have some Excel worksheets that use ActiveX checkboxes to control certain activity. They worked recently but today started to give errors. I was alerted to this by a colleague, but it was still working on my computer. I checked his version of Excel against mine and his was newer. I noticed there were new Windows updates, so I did the update. After I applied pending updates, it now no longer works on my computer. I cannot check the ActiveX checkboxes any longer, and, as a part of trying to debug, it appears I cannot even add an ActiveX control to any worksheet, even a new worksheet, any more. I get an error dialog that says, "Cannot insert object." (I can still add form controls, just not ActiveX.) Anyone else experiencing this after a recent update? Any suggestions?
Thanks,
Mike
From other forums, I have learned that it is due to the MS Update and that a good fix is to simply delete the file MSForms.exd from any Temp subfolder in the user's profile. For instance:
C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd
C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd
C:\Users\[user.name]\AppData\Local\Temp\Word8.0\MSForms.exd
Of course the application (Excel, Word...) must be closed in order to delete this file.
Here is the best answer that I have found on the Microsoft Excel Support Team Blog
For some users, Forms Controls (FM20.dll) are no longer working as
expected after installing December 2014 updates. Issues are
experienced at times such as when they open files with existing VBA
projects using forms controls, try to insert a forms control in to a
new worksheet or run third party software that may use these
components.
You may received errors such as:
"Cannot insert object" "Object library invalid or contains references
to object definitions that could not be found"
Additionally, you may be unable to use or change properties of an
ActiveX control on a worksheet or receive an error when trying to
refer to an ActiveX control as a member of a worksheet via code.
Steps to follow after the update:
To resolve this issue, you must delete the cached versions of the
control type libraries (extender files) on the client computer. To do
this, you must search your hard disk for files that have the ".exd"
file name extension and delete all the .exd files that you find. These
.exd files will be re-created automatically when you use the new
controls the next time that you use VBA. These extender files will be
under the user's profile and may also be in other locations, such as
the following:
%appdata%\Microsoft\forms
%temp%\Excel8.0
%temp%\VBE
Scripting solution:
Because this problem may affect more than one machine, it is also
possible to create a scripting solution to delete the EXD files and
run the script as part of the logon process using a policy. The script
you would need should contain the following lines and would need to be
run for each USER as the .exd files are USER specific.
del %temp%\vbe\*.exd
del %temp%\excel8.0\*.exd
del %appdata%\microsoft\forms\*.exd
del %appdata%\microsoft\local\*.exd
del %appdata%\Roaming\microsoft\forms\*.exd
del %temp%\word8.0\*.exd
del %temp%\PPT11.0\*.exd
Additional step:
If the steps above do not resolve your issue, another step that can be
tested (see warning below):
On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.
Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile
VBAProject.
Save and reopen the file. Test for resolution. If resolved, provide this updated project to additional users.
Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will
also need to have the updates applied on their systems and .exd files
removed as well.
If this does not resolve your issue, it may be a different issue and
further troubleshooting may be necessary.
Microsoft is currently working on this issue. Watch the blog for
updates.
Source
It was KB2553154. Microsoft needs to release a fix. As a developer of Excel applications we can't go to all our clients computers and delete files off them. We are getting blamed for something Microsoft caused.
I'm an Excel developer, and I definitely felt the pain when this happened. Fortunately, I was able to find a workaround by renaming the MSForms.exd files in VBA even when Excel is running, which also can fix the issue. Excel developers who need to distribute their spreadsheets can add the following VBA code to their spreadsheets to make them immune to the MS update.
Place this code in any module.
Public Sub RenameMSFormsFiles()
Const tempFileName As String = "MSForms - Copy.exd"
Const msFormsFileName As String = "MSForms.exd"
On Error Resume Next
'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\MSForms.exd file
RenameFile Environ("TEMP") & "\Excel8.0\" & msFormsFileName, Environ("TEMP") & "\Excel8.0\" & tempFileName
'Try to rename the C:\Users\[user.name]\AppData\Local\Temp\VBE\MSForms.exd file
RenameFile Environ("TEMP") & "\VBE\" & msFormsFileName, Environ("TEMP") & "\VBE\" & tempFileName
End Sub
Private Sub RenameFile(fromFilePath As String, toFilePath As String)
If CheckFileExist(fromFilePath) Then
DeleteFile toFilePath
Name fromFilePath As toFilePath
End If
End Sub
Private Function CheckFileExist(path As String) As Boolean
CheckFileExist = (Dir(path) <> "")
End Function
Private Sub DeleteFile(path As String)
If CheckFileExist(path) Then
SetAttr path, vbNormal
Kill path
End If
End Sub
The RenameMSFormsFiles subroutine tries to rename the MSForms.exd files in the C:\Users\[user.name]\AppData\Local\Temp\Excel8.0\ and C:\Users\[user.name]\AppData\Local\Temp\VBE\ folders to MSForms - Copy.exd.
Then call the RenameMSFormsFiles subroutine at the very beginning of the Workbook_Open event.
Private Sub Workbook_Open()
RenameMSFormsFiles
End Sub
The spreadsheet will try to rename the MSForms.exd files when it opens. Obviously, this is not a perfect fix:
The affected user will still experience the ActiveX control errors when running the VBA code the very first time opening the spreadsheet. Only after executing the VBA code once and restarting Excel, the issue is fixed. Normally when a user encounters a broken spreadsheet, the knee-jerk reaction is to close Excel and try to open the spreadsheet again. :)
The MSForms.exd files are renamed every time the spreadsheet opens, even when there's no issue with the MSForms.exd files. But the spreadsheet will work just fine.
At least for now, Excel developers can continue to distribute their work with this workaround until Microsoft releases a fix.
I've posted this solution here.
With Windows 8.1 I couldn't find any .exd files using windows search. On the other hand, a cmd command dir *.exd /S found the one file on my system.
Advice in KB and above didn't work for me. I discovered that if one Excel 2007 user (with or without the security update; not sure of exact circumstances that cause this) saves the file, the original error returns.
I discovered that the fastest way to repair the file again is to delete all the VBA code. Save. Then replace the VBA code (copy/paste). Save. Before attempting this, I delete the .EXD files first, because otherwise I get an error on open.
In my case, I cannot upgrade/update all users of my Excel file in various locations. Since the problem comes back after some users save the Excel file, I am going to have to replace the ActiveX control with something else.
The best source of information and updates on this issue I could find is in the TechNet Blogs » The Microsoft Excel Support Team Blog (as mentioned):
Form Controls stop working after December 2014 Updates (Updated March 10, 2015)
On March 2015 a hotfix was released in addition to the automated fix-it and manual instructions, and it's available on Windows Update as well.
The latest update and fix from Microsoft:
3025036 "Cannot insert object" error in an ActiveX custom Office solution after you install the MS14-082 security update
STATUS: Update March 10, 2015:
Hotfixes for this issue have been released in the March 2015 Updates for Office 2007, 2010 & 2013.
General info about the problem:
For some users, Form Controls (FM20.dll) are no longer working as expected after installing MS14-082 Microsoft Office Security Updates for December 2014. Issues are experienced at times such as when they open files with existing VBA projects using forms controls, try to insert a forms control in to a new worksheet or run third party software that may use these components.
https://technet.microsoft.com/en-us/library/security/ms14-082.aspx
You may receive errors such as:
"Cannot insert object"; "Object library invalid or contains references to object definitions that could not be found"; "The program used to create this object is Forms. That program is either not installed on your computer or it is not responding. To edit this object, install Forms or ensure that any dialog boxes in Forms are closed." [...]
Additionally, you may be unable to use or change properties of an ActiveX control on a worksheet or receive an error when trying to refer to an ActiveX control as a member of a worksheet via code.
Manual and additional solutions:
Scripting solution:
Because this problem may affect more than one machine, it is also possible to create a scripting solution to delete the EXD files and run the script as part of the logon process using a policy. The script you would need should contain the following lines and would need to be run for each USER as the .exd files are USER specific.
del %temp%\vbe\*.exd
del %temp%\excel8.0\*.exd
del %appdata%\microsoft\forms\*.exd
del %appdata%\microsoft\local\*.exd
del %temp%\word8.0\*.exd
del %temp%\PPT11.0\*.exd
Additional step:
If the steps above do not resolve your issue, another step that can be tested (see warning below):
On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.
Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.
Save and reopen the file. Test for resolution.
If resolved, provide this updated project to additional users.
Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will also need to have the updates applied on their systems and .exd files removed as well.
Simplified instructions for end-users. Feel free to copy/paste the following.
Here’s how to fix the problem when it comes up:
Close all your Office programs and files.
Open Windows Explorer and type %TEMP% into the address bar, then press Enter. This will take you into the system temporary folder.
Locate and delete the following folders: Excel8.0, VBE, Word8.0
Now try to use your file again, it shouldn't have any problems.
You might need to wait until the problem occurs in order for this fix to work. Applying it prematurely (before the Windows Update gets installed on your system) won't help.
I did finally find this answer on the official Microsoft KB:
http://support.microsoft.com/kb/3025036/EN-US
No new information here than what we have in previous answers, but at least it acknowledges that Microsoft is aware of the issue.
I know many answers have already been posted for this, but neither one answer independently worked for my site. So here is what worked for me:
Step 1: Uninstall the following updates - KB2920789, KB2920790, KB2920792, KB2920793, KB2984942, KB2596927
Step 2: Hide these updates so they do not get installed on subsequent reboots
Step 3: Delete folder Excel8.0 from C:\Users\<>\AppData\Local\Temp
Step 4: Restart workstatiion (I would also make sure the above mentioned KBs did not inadvertently get applied)
I want to provide an answer that worked as the only thing for me (I realize that I might be the only one ever). I had in one macro that I was calling using the ribbon. It had the following code:
colStore = new Collection
I wasn't aware that it throws an error so I was baffled and tried everything in here. The button just stopped working and I couldn't get it to work. When I noticed the error and corrected it to:
Set colStore = new Collection
It started working again. Absolutely strange if you ask me but maybe it helps someone out there who was as desperate as me.

TFS2010: Opening certain Excel reports gives error TF80076

When I try and open certain TFS2010 Excel reports I get the following error popup from Excel:
TF80076: The data in the work item is
not valid or you do not have
permissions to modify the data. Please
correct the problem and retry.
This is then followed by the popup:
TF208103: The initialization of the
workbook to connect to Team Foundation
Server was not successful. THe
workbook will close.... etc. etc..
... and Excel closes.
The reports that throw this error include:
Documents -> Samples and Templates ->
Project Management -> Document
Template - Iteration Backlog.xlsm (in
fact all reports in this directory
fail)
Documents -> Shared Documents ->
Iteration 1 -> Issues.xlsx (and all
reports in this directory also fail)
I believe that the error may be misleading as this only happens under one project collection and this is a project collection I had some trouble setting up so it was recreated a couple of times. I suspect that the SharePoint site that hosts the reports has got out of sync with the project collection.
Any ideas how to fix these errors?
Is there a way to regenerate the reports that error on the SharePoint site so that they can rebind with the project?
Thanks!
At the time the Team Project is generated those Excel sheets are also generated, pointing to "Iteration 1" Iteration (found at right-clicking Team Project, then "Team Project Settings">"Areas and Iterations...") & also referring to Work Item - Team Query "Iteration 1\Iteration Backlog".
If you managed to edit/delete those two, the Excel functionality shall be broken. Try to restore those back & the Excel shall work again. Then go to Excel Ribbon "Team" and choose "Configure\List" & set a valid query, pointing to a valid Iteration within your Team Project.
You can now delete the query, as well as the Team Project Iteration.
I had found this resolution here - (it's in German) & it was a lifesaver
There is also another route to possible success, taken partially from here:
Open Visual Studio, choose Team -> Team Project Collection Settings -> Process Template Manager. You can download the MSF 5 template to a folder on your hard drive. Then navigate to
FOLDER YOU DOWNLOADED TO\MSF for Agile Software Development v5.0\Windows SharePoint Services\Shared Documents\Project Management\
Under this folder you will see the (now connectionless) Iteration Backlog.xlsm.
Open it & under "Team" choose "New List" & connect it to your Query "Iteration 1" or similar suitable Query.
I also come across same issue. After trying following changes it started working.
Check from edit query in Azur if your query using variable like "#RecentProjectActivity" then replace it with other possible static references like you can refer some Area Path or any ID. Hope it will resolve your issue. Thank you.
I got this because the query Iteration 1/Iteration Backlog didn't work because I had change the iteration structure but not updated the query correspondingly.
So if you get this error, check that the query that the Excel list is using is working.
Faced similar problem when using # macros like '#currentiteration'.
Excel 2013 is not supporting importing Query with filters with macros to be added as List
Changing #currentiteration to absolute name of iteration resolved the issue

Error 70 in Excel VBA

I am trying to upload directly a picture/chart from excel to a Sharepoint group URL. Here is the script:
Sub ExportChartJPG()
ActiveChart.Export Filename:="http://sharepoint.ap.xxxxxxxxxxxxxx.com/xxxxxx/xxxxxxxxxxxxxx/Pictures/MyChart.jpg", _FilterName:="jpeg"
End Sub
Is that possible? If it's not then can you suggest another way of doing it? Thanks
You can only export to a file, not to a URL. So, you could export to a temporary file on disk, and then submit the file to your web server. You would of course need the web server to have the ability to receive files.
Hang on, from the URL, it's a SharePoint server, yes? Presumably a SharePoint document library? In that case, you need to write some code to use one of the following techniques to upload the file:
SharePoint Web Service
WebDAV
FrontPage Extensions
If you want to do this in VBA, then the MSXML3 library may be useful, since it will let you do HTTP requests.
EDIT: OK, based on your comments, here's a simple VBScript script to get you started. This opens an Excel workbook at a known location, and exports the first chart sheet.
Save this as "test.vbs" and then double-click on it to run it (having created a suitable Excel file, etc.).
Dim oExcel : Set oExcel = CreateObject("Excel.Application")
Dim oWorkbook : Set oWorkbook = oExcel.Workbooks.Open("C:\test.xls")
Dim oChart : Set oChart = oWorkbook.Charts(1)
oChart.Export "C:\chart.jpg", "JPEG"
oWorkbook.Close False
oExcel.Quit
As I said in my comment, VBScript is very much like VBA, but the downside is that there's no strong typing, so you don't get Intellisense, etc. It might be easier to create the script in VBA where you do have Intellisense (and a debugger, etc.) and then "port" it to VBScript.

Resources