adding picture to worksheet

K

Kilo Bravo

I have an excel VBA module which inserts some BMP files into a spreadsheet. I know there are better ways to this but this is how the boss wants it. anyway, it works good but suddenly the BMP files are sized small. I mean it used insert the BMP files at their full size. The critical line of code is:

activesheet.pictures.insert(pathname & filename)

There is no size attribute involved here.

Any ideas out there? Is there a better way to code it?

--
K.Brown
/*****************************************************************************
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
******************************************************************************/
 
T

Tom Ogilvy

Try the AddPicture method of the Shapes Collection:

expression.AddPicture(FileName, LinkToFile, SaveWithDocument, Left, Top,
Width, Height)

--
Regards,
Tom Ogilvy


I have an excel VBA module which inserts some BMP files into a spreadsheet.
I know there are better ways to this but this is how the boss wants it.
anyway, it works good but suddenly the BMP files are sized small. I mean it
used insert the BMP files at their full size. The critical line of code is:

activesheet.pictures.insert(pathname & filename)

There is no size attribute involved here.

Any ideas out there? Is there a better way to code it?

--
K.Brown
/***************************************************************************
**
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
****************************************************************************
**/
 

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

Similar Threads

hiding workbooks 5
ColorIndex 5
volumes 1
NTFS 2
insert picture 3
error 429 2
causing a win2k boot failure 4
Process Viewer 1

Top