Office code samples

Download Office code samples and applications. New samples are added frequently in JavaScript, C++, C#, and VB.NET so check back often.You can also download code samples for other products like apps for Office, apps for SharePoint, Windows Azure, Silverlight, SharePoint, Windows 8, Windows Phone, or explore the official Visual Studio 2010 C#, VB.NET, and 101 LINQ samples.
Each sample is licensed to you by the party distributing it. Microsoft does not guarantee the samples or grant rights for any sample distributed by a party other than Microsoft. Use of this site is subject to the Terms of Use.
Sort by: rss
63 results in vba, excel [Clear]
Zhodani101
I have a spreadsheet with VBA code that produces some data. This runs everyday but I wanted to avoid saving the code everyday; this is for confidentiality issues, storage space, or simply to avoid data to be lost if the code is run by mistake.The code I am using is an extension o
4.5 Star
(2)
Updated 10/15/2012
Released 10/15/2012
OneCode Team
The CSVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects.
4.5 Star
(2)
Updated 5/5/2011
Released 1/21/2011
12,024 Downloads
C#
OneCode Team
The VBVstoVBAInterop project demonstrates how to interop with VBA project object model in VSTO projects.
4 Star
(2)
Updated 5/5/2011
Released 1/21/2011
11,309 Downloads
OneCode Team - Microsoft
The VBAutomateExcel example demonstrates how to write VB codes to create and automate a Microsoft Excel instance
4 Star
(4)
Updated 3/2/2012
Released 3/2/2012
34,816 Downloads
OneCode Team - Microsoft
The VBAutomateExcel example demonstrates how to write VB codes to create and automate a Microsoft Excel instance
3.5 Star
(4)
Updated 3/2/2012
Released 1/21/2011
17,256 Downloads
VSTOTeam - Microsoft
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
4 Star
(1)
Updated 2/19/2011
Released 2/18/2011
5,845 Downloads
VSTOTeam
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
4 Star
(1)
Updated 9/7/2012
Released 4/3/2012
6,890 Downloads
VSTOTeam - Microsoft
This sample demonstrates how to call a method in a document-level customization for Microsoft Office Excel from Visual Basic for Applications (VBA) code in the workbook.
3 Star
(1)
Updated 9/7/2012
Released 9/7/2012
3,145 Downloads
Microsoft Office Developer Documentation Team

Microsoft Office Developer Documentation Team MSFT

Microsoft Office Developer Documentation Team samples are developed and tested by the Office Developer Documentation Team to ensure that you have a great experience.

View samples
- Microsoft
This sample shows how to use the WorkbookNewChart
event and WorkbookAfterSave event in Microsoft Excel 2010 to create chart events programmatically upon saving the file.This code snippet is part of the Office 2010 101 code samples project. This sample, along with others, is offe
4 Star
(1)
Updated 8/3/2011
Released 8/3/2011
2,183 Downloads
Microsoft Office Developer Documentation Team

Microsoft Office Developer Documentation Team MSFT

Microsoft Office Developer Documentation Team samples are developed and tested by the Office Developer Documentation Team to ensure that you have a great experience.

View samples
- Microsoft
Learn how to create add-ins for Microsoft Word 2010, PowerPoint 2010, and Excel 2010 by using Visual Basic for Applications (VBA). Examine when VBA might be the best choice for your add-in and explore several sample tasks that can be included in VBA add-ins for Microsoft Office 2
4.5 Star
(4)
Updated 4/7/2011
Released 4/5/2011
7,481 Downloads

Couldn't find the sample you were looking for?

1 - 10 of 63 Items