Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding OLE objects from VBA in Excel

I want to generate a number of images of a sheet from code. I can
create the image boxes exactly as I want but CANNOT work out how to
add the pictures from code. Can anyone help me please?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Adding OLE objects from VBA in Excel

Neil,

Try something like


Dim WS As Worksheet
Dim SHP As Shape
Set WS = ActiveSheet
With WS.Range("C3")
Set SHP = WS.Shapes.AddPicture(Filename:="C:\wires.jpg",
linktofile:=False, _
savewithdocument:=True, Top:=.Top, Left:=.Left, Width:=100,
Height:=100)
End With



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Neil" wrote in message
om...
I want to generate a number of images of a sheet from code. I

can
create the image boxes exactly as I want but CANNOT work out

how to
add the pictures from code. Can anyone help me please?



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 pictures, images or objects darkside7out Excel Discussion (Misc queries) 1 March 10th 10 01:05 AM
PowerPoint objects in Excel suzdapocho Excel Discussion (Misc queries) 0 March 25th 08 06:34 PM
Adding specific objects based on data... Kay Excel Discussion (Misc queries) 2 July 14th 05 09:28 AM
Objects in VBA and Excel Stephen Bianchi Excel Programming 2 September 1st 03 07:36 PM
Screen is flashing when VBA adding objects into Excel sheet? Don Guillett[_4_] Excel Programming 0 July 8th 03 03:01 PM


All times are GMT +1. The time now is 08:47 AM.

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"