# Custom Menu in RobotStudio

**URL:** <https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87>\
**Category:** RobotStudio S4\
**Created:** [October 29, 2003, 3:45pm UTC](https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87 "2003-10-29T15:45:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [October 29, 2003, 3:45pm UTC](https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87/1 "2003-10-29T15:45:37Z")

</div>

[ExtraMenu.zip](http://forums.robotstudio.com/webwiz/ExtraMenu.zip)

This is a station that when you open it it creates an extra “Custom Menu”, and when you close the station it removes the menu.

All the sourcecode can be found in the station  
(Tools\>Macro\>Visual Basic Editor)

👏👏

---

<div class="post-metadata">

**Author:** ![Klaus](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@Klaus](https://tech-community.robotics.abb.com/u/Klaus)\
**Post date:** [October 30, 2003, 3:02pm UTC](https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87/2 "2003-10-30T15:02:51Z")

</div>

What do i do with this line if i want to use the code in an VB.

Dim WithEvents TheRSE As RSEXT.RSE

I’m working on an ADD-IN

Klaus :stuck\_out\_tongue\_winking\_eye::stuck\_out\_tongue\_winking\_eye::stuck\_out\_tongue\_winking\_eye:

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [October 30, 2003, 3:21pm UTC](https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87/3 "2003-10-30T15:21:22Z")

</div>

RSE stands for RobotStudio Extensibility. That is extra menus and toolbars etc. Why we declare it with events is so that we can catch the _CommandBarControlClick_ event which tells us that the user has clicked a menu control or toolbar button control.

Just use it, as is, in the top declaration of the add-in.  
Then in the initialization of the add-in you should have the _TheRSE=Application.rse_ line.

In a station, a module, an add-in, or whatever. It doesn’t matter the principle is the same.

:sunglasses:

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [October 30, 2003, 3:30pm UTC](https://tech-community.robotics.abb.com/t/custom-menu-in-robotstudio/87/4 "2003-10-30T15:30:31Z")

</div>

Here is a VB add-in that I created a while ago, it is a multi object renamer. It shows the same examples:

[MultiRename.zip](http://forums.robotstudio.com/webwiz/MultiRename.zip)
