Launch a userform from a Custom Toolbar Button

Lensmeister

Registered User.
Local time
Today, 12:53
Joined
Feb 18, 2009
Messages
65
Hi all,

This is probably very basic and I am missing somthing really obvious.

I have a custom toolbar with a button on it that I want to open a userform from.

I have tried this macro

Code:
Sub Admin_Show()
frmAdmin.Show
End Sub

and the button on the custom button calls the macro with

Code:
With .Controls.Add(Type:=msoControlButton)
.Caption = "Open Admin Form"
.Style = msoButtonIcon
.FaceId = 191
.OnAction = "Admin_Show"
End With

Alas it does not work.

Can someone advise please

Thanks
 
When you say custom toolbar, does this mean you have Excel 2003 or lower, if so why not use the Tools and Custom then use the last tab for Commands Search down the list on the left for Macro then drag the smile face into your toolbar and adjust the options button to use your macro and then pick your picture and add some tool pit text.
 

Users who are viewing this thread

Back
Top Bottom