XmlMappedRange.ClearNotes Method (2007 System)
Clears notes and sound notes from the XmlMappedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Function ClearNotes As Object
'Usage
Dim instance As XmlMappedRange
Dim returnValue As Object
returnValue = instance.ClearNotes()
public Object ClearNotes()
public:
Object^ ClearNotes()
public function ClearNotes() : Object
Return Value
Type: System.Object
Examples
The following code example uses the NoteText method to add a note to an XmlMappedRange, and then prompts the user to remove the note by using the ClearNotes method. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.
Private Sub SetNote()
Me.CustomerLastNameCell.NoteText("This cell contains customer " & _
"last names.")
If MessageBox.Show("Remove the note?", "Test", MessageBoxButtons.YesNo) = _
DialogResult.Yes Then
Me.CustomerLastNameCell.ClearNotes()
End If
End Sub
private void SetNote()
{
this.CustomerLastNameCell.NoteText("This cell contains customer " +
"last names.", missing, missing);
if (MessageBox.Show("Remove the note?", "Test",
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
this.CustomerLastNameCell.ClearNotes();
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.