Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.csharp,microsoft.public.excel.misc
|
|||
|
|||
Excel.Range.Name gives error an exception
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS Excel Error - Win32 exception | Setting up and Configuration of Excel | |||
Excel.Range.Name gives error an exception | Excel Discussion (Misc queries) | |||
Excel causing exception error upon opening the document | Excel Programming | |||
Excel causing exception error upon opening the document | Excel Programming | |||
Excel causing exception error upon opening the document | Excel Programming |