Adding Bitmap to Worksheet

M

Macca

Hi,

I am using Automation with VC++ 6 to create,format and write data to an
excel spreadsheet.

I am having problems knowing who to add a bitmap to my spreadsheet through
automation. Can anyone tell me how to do this?

Thanks In Advance,
Macca
 
J

Jim Rech

I don't know the C++ syntax but in VB I'd do something like:

ActiveSheet.Pictures.Insert "C:\Pic.bmp"

--
Jim Rech
Excel MVP
| Hi,
|
| I am using Automation with VC++ 6 to create,format and write data to an
| excel spreadsheet.
|
| I am having problems knowing who to add a bitmap to my spreadsheet through
| automation. Can anyone tell me how to do this?
|
| Thanks In Advance,
| Macca
 
M

Macca

Hi Jim,

Thanks for the reply. How can i select whereabouts on the worksheet, the
bitmap goes?

Cheers
Macca
 
T

Tom Ogilvy

set pic = ActiveSheet.Pictures.Insert ("C:\Pic.bmp")
With activesheet.Range("B9")
pic.Top = .Top
pic.Left = .Left
End with

aligns the upper left corner of the picture wit the upper left corner of
Cell B9.
 

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