Macro to insert an icon onto the toolba

I

Inmarsat

Thanks in Advance,

I've created a macro to add the "insert picture from file" to the toolbar
but I need to add text to the icon and I'm unsure on the coding I will need
to be able to do this.

Many Thanks

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 14/10/2005 by user
'

'
Application.CommandBars("Standard").Controls.Add Type:=msoControlButton,
ID _
:=2619, Before:=8
End Sub
 
D

Dawn Crosier

I think you will want to modify your code to:

Set ctrlControl = CommandBars("Standard") _
.Controls.Add(msoControlButton, ID:=2619, Before:=8)
ctrlControl.Caption = "Insert &Picture"
ctrlControl.Style = msoButtonIconAndCaption

Let us know if you need more help.

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and
questions to the newsgroup so that others can learn as well.

Thanks in Advance,

I've created a macro to add the "insert picture from file" to the
toolbar
but I need to add text to the icon and I'm unsure on the coding I
will need
to be able to do this.

Many Thanks

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 14/10/2005 by user
'

'
Application.CommandBars("Standard").Controls.Add
Type:=msoControlButton,
ID _
:=2619, Before:=8
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top