Custom Button´s Face Icon

M

Mazinguer Z

Hi. I´m writting a XLA file with Excel, and I need customice the Face
icon of buttons that I create in the Workbook Menu.

I now use Worksheets(1).myDocument.Shapes.AddPicture for open de ico
file with image for next do the copy and pasteFace, but the problem is
that in a XLA file there isn´t a Worksheets :( How can I do?
 
J

Jean-Guy Marcil

Hi Mazinguer,

I am no Excel VBA expert, but it seems to me that
Worksheets(1).myDocument.Shapes.AddPicture

is not correct syntax, I think you want something like:

Dim myDocument As Worksheet

Set myDocument = Worksheets(1)

myDocument.Shapes.AddPicture "Picture path and name"

If you absolutely need a Worksheet to add a picture to and from which you
will create your icon, just open an "Invisible" workbook, then close it
without saving it.

In any case, you should probably take it up with the people in the Excel
newsgroup, this is a Word newsgroup.

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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