Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Office.Tools.Ribbon;
- using Microsoft.Office.Tools.Excel;
- using Microsoft.Office.Interop.Excel;
- namespace ExcelAddIn2
- {
- public partial class Ribbon1
- {
- private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
- {
- }
- private void GetRageValues()
- {
- Range range = Globals.ThisAddIn.Application.get_Range("A1", "A3");
- //to be replaced with database insert
- System.Windows.Forms.MessageBox.Show("You Selected" + range.Address);
- }
- private void button1_Click_1(object sender, RibbonControlEventArgs e)
- {
- GetRageValues();
- }
- }
- }
- Microsoft.Office.Interop.Excel.Range SelectedRange = Globals.ThisAddIn.Application.Selection;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement