View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chuck Chuck is offline
external usenet poster
 
Posts: 90
Default 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?