View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default OLEObjects, adding a picture problem.

Using your code I get an icon if insert a gif or the full picture with a
jpg. My file association's for these extensions open different app's, might
be worth looking at same in your boss's

Why not simply Insert Picture from file

Regards,
Peter T


"Eric" wrote in message
...
Hi,

I am trying to insert a picture in a cell, using VB6. On all computers

where
the application was tested, it worked like a charm. All but one (the

boss's
computer of course ...). In this particular instance, instead of inserting
the actual picture, it inserts the icon of the bitmap with the filename as
seen from within windows explorer ...

Dim sFileName as string
sFileName = "c:\picture.bmp"
owks.Range("A1").Select
Dim im As Object
Set im = owks.OLEObjects.Add(FileName:=sFileName, Link:=False,
DisplayAsIcon:=False)
im.Border.Color = -1
im.ShapeRange.ZOrder 1

Why does it do that on this particular computer??? (exact same version of
Windows, Excel)
Thx for your help