Inserting a picture/drawing

  • Thread starter Robert Dieckmann
  • Start date
R

Robert Dieckmann

I am trying to set up a spreadsheet where it will embed one of two drawings
(which I copy-clipped from AutoCAD) based on a parameter within the
worksheet. I thought when I created the second drawing it would
automatically give a different formula, but both of them say:
=EMBED("AutoCAD.Drawing.16","").

In essence I'm looking for a formula such as this:
=If(A1="x",EMBED("AutoCAD.Drawing.16",""),EMBED("AutoCAD.Drawing.17",""))

Is this possible? If so, how do I go about it? Why does it bring different
drawings in with the same number (16)? If I try to change the "16" on the
second drawing it gives me an error [The text you entered is not a valid
reference or defined name]. So many questions, so few answers. I am using
Excel 2000 & AutoCAD 2006.

Bob
 
G

Guest

Look in the Name Box (left of the Formula Bar) for the object's name. You can
change it if you like.

If there are only a few pictures involved, I think I would embed all the
pictures and toggle the visible property instead of inserting and deleting.
You probably know this, but a formula per se can't execute an action like
this (i.e. change the worksheet environment). You will need to use, for
example, worksheet event code or a macro.

Regards,
Greg
 
R

Robert Dieckmann

Thanks for the tip. Now the second half of the problem. How exactly do
I set up this event in VBA. I have re-named my two objects to fdnSB &
fdnHTT. I tried the following code but it did not work:

fdnSB.Visible = True

This should be simple, but what am I missing? Thanks for helping a
novice.
 

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