Search
DefineNamedRangeForm Class
Remarks See Also
 






Prompts the user to define a named range for a worksheet.

Namespace: MindFusion.Spreadsheet.WinForms
Assembly: MindFusion.Spreadsheet.WinForms.StandardForms

 Syntax

C#  Copy Code

public class DefineNamedRangeForm : Form

Visual Basic  Copy Code

Public Class DefineNamedRangeForm
    Inherits Form

 Remarks

This form can be used to add a NamedRange object to a workbook. To use the form, create an instance of the DefineNamedRangeForm class by providing the related worksheet, and call the ShowDialog method. The NamedRange object specified in the form can be accessed through the NamedRange property. The following image shows the form:

 Example

The code below demonstrates how to display the form for an existing worksheet.

C#  Copy Code

var form = new DefineNamedRangeForm(worksheet);
if (form.ShowDialog() == DialogResult.OK && form.NamedRange != null)
    workbook.NamedRanges.Add(form.NamedRange);

Visual Basic  Copy Code

Dim form = New DefineNamedRangeForm(worksheet)
If form.ShowDialog() = DialogResult.OK AndAlso form.NamedRange IsNot Nothing Then
    workbook.NamedRanges.Add(form.NamedRange)
End If

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                    System.Windows.Forms.ContainerControl
                        System.Windows.Forms.Form
                            MindFusion.Spreadsheet.WinForms.DefineNamedRangeForm

 See Also