Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi All,
I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null) { Excel.Name name = range.Name as Name; if (name.Name != null || name.Name.Length != 0) { return name.Name; } return string.Empty; } return string.Empty; } catch(Exception e) { return string.Empty; } } ///// Code End //// Now every time my very third line "if (range.Name != null)" gives me Exception an exception of type: {System.Runtime.InteropServices.COMException} occurred Any suggestions, thanks & regards, Rushi |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula w exception | Excel Discussion (Misc queries) | |||
Exception report in excel | Excel Worksheet Functions | |||
exception generated was c0000005 | Charts and Charting in Excel | |||
Price rounding - exception formula required | Excel Worksheet Functions |