Welcome to MSDN Blogs Sign in | Join | Help

VSTO, Partial Classes, ENC (Edit and Continue) sample code

using System;

using System.Data;

using System.Drawing;

using System.Windows.Forms;

using Microsoft.VisualStudio.Tools.Applications.Runtime;

using Excel = Microsoft.Office.Interop.Excel;

using Office = Microsoft.Office.Core;

 

namespace ExcelWorkbook

{

    public partial class Sheet1

    {

        private void Sheet1_Startup(object sender, System.EventArgs e)

        {

        }

        private void Sheet1_Shutdown(object sender, System.EventArgs e)

        {

        }

        #region VSTO Designer generated code

 

        /// <summary>

        /// Required method for Designer support - do not modify

        /// the contents of this method with the code editor.

        /// </summary>

        private void InternalStartup()

        {

            this.button1.Click += new System.EventHandler(this.button1_Click);

            this.Shutdown += new System.EventHandler(this.Sheet1_Shutdown);

            this.Startup += new System.EventHandler(this.Sheet1_Startup);

 

        }

 

        #endregion

        private void button1_Click(object sender, EventArgs e)

        {

            Excel.Range range = null;

            range = this.Range["A1", "A3"];

            range.Value2 = "A Value";

            // ENC code added at debug time

            //range = this.Range["B1", "B3"];

            //range.Value2 = "B Value";

        }

    }

}

 

Published Monday, April 24, 2006 5:58 PM by JackG

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# An ISV insight into the CLR and .Net framework 2.0 features

Monday, April 24, 2006 9:24 PM by Jack Gudenkauf (JackG) WebLog
This was my first webcast, so please be patient through the beginning.&amp;nbsp; It gets much better there...

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker