none
test 1 RRS feed

All replies

  • ljlkjl;;;jl
    Bruce Taimana - SDET Team Test
    Tuesday, October 7, 2008 4:27 AM
  •   
    1 private void addNamedRanges()  
    2 {  
    3

    ExcelT.NamedRange anmdRange;  

    4

    ExcelT.Worksheet asht;  

    5

    ExcelT.ControlCollection cc;  

    6

    asht = Globals.Sheet1;  

    7

    cc = asht.Controls;  

    8

    anmdRange = cc.AddNamedRange(asht.InnerObject.Range("a1"), "somenamedRange");  

    9

    anmdRange.Change += new  Microsoft.Office.Interop.Excel.DocEvents_ChangeEventHandleranmdRange_Change);  

    10 }  
    11 void anmdRange_Change(Microsoft.Office.Interop.Excel.Range Target)  
    12 {  
    13 MessageBox.Show(Target.Value2.ToString());  
    14 }  
    15  

    Minor bugbear, I can't tab the code in the edit code pane.
    Wednesday, October 8, 2008 7:27 PM