Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Open winform/taskpane from worksheet button

42 views
Skip to first unread message

Ronald van Wijnen

unread,
Nov 7, 2024, 5:10:56 PM11/7/24
to exce...@googlegroups.com
Hi,

Is it possible to open call a c# function from a worksheet button for opening a winform or a taskpane?

Everything works fine with ribbon buttons but I can’t get it to work with worksheet buttons.

Govert van Drimmelen

unread,
Nov 7, 2024, 5:31:20 PM11/7/24
to Excel-DNA
If you make a macro like this, then you can assign the name to a worksheet button.
Note that the macro won't be listed in the dialog, as Excel considers all macros from .xll add-ins to be hidden.

[ExcelCommand]
public static void MyMacro()
{
    // ...
}

-Govert

Ronald van Wijnen

unread,
Nov 8, 2024, 4:50:32 AM11/8/24
to Excel-DNA
Thanks Govert!

This has put me in the right direction and has been solved.

Ronald.

Op donderdag 7 november 2024 om 23:31:20 UTC+1 schreef Govert van Drimmelen:
Reply all
Reply to author
Forward
0 new messages