Word ActionsPane Button with C#

I would like to add a 'close' button to my userform control in the actions pane that when clicked, unloads the userform control.

I am new to c# and am having a difficult time in figuring out how to refer to the userform from within the module.  In VBA it would be Me.close or somesuch.
LVL 1
deedub84Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Roshan DavisConnect With a Mentor Commented:
if you want to close the main from from anywhere, you can try the following
Application.OpenForms[0].Close();

Open in new window

0
 
g105bCommented:
Application.Exit();
0
 
Roshan DavisCommented:
this.close(); is equivalent to Me.close
0
All Courses

From novice to tech pro — start learning today.