Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default OLEObjects, adding a picture problem.

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a picture to a form Ruth Excel Discussion (Misc queries) 7 October 31st 08 06:04 PM
Adding OLEObjects Word Doc 8 vqthomf Excel Programming 0 December 15th 05 09:30 AM
Problem with OLEObjects augustus Excel Programming 0 April 1st 05 01:23 AM
Problem activating OLEObjects Peter Fopma Excel Programming 1 November 9th 04 11:48 AM


All times are GMT +1. The time now is 10:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"