Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel & C# NullReference Error when trying to set Range.Value2
When trying to assign a string to the Value2 property of a Range:
WorksheetA.get_Range("A1",Type.Missing).Value2=cur Value.Trim(); I'm getting this error message: Object reference not set to an instance of an object. Any suggestions? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel & C# NullReference Error when trying to set Range.Value2
Also, the Range is not null, it is the Value2 object that is null. The
mystery is how to ensure that the Value2 object is not null. "Chuck" wrote: When trying to assign a string to the Value2 property of a Range: WorksheetA.get_Range("A1",Type.Missing).Value2=cur Value.Trim(); I'm getting this error message: Object reference not set to an instance of an object. Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel NPV initial cost in value1 and first year return in value2? | Excel Worksheet Functions | |||
Range.Value2 is failing for lenghty strings | Excel Programming | |||
Merged cells Value2 property | Excel Programming | |||
Lookup Value2 | Excel Programming | |||
Activecell.value or value2? | Excel Programming |