Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way (using code) to insert a picture to a worksheet? I have
tried recording the process but have not been succesful. I want to insert graphic C:\pictures\Test.gif into cell C3. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() One way is: Range("C3").Select ActiveSheet.OLEObjects.Add(Filename:="C:\Users\xxx \Documents\xxx.jpg", _ Link:=False, DisplayAsIcon:=False).Select -- Simon Lloyd Regards, Simon Lloyd 'www.thecodecage.com' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=29833 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way (using code) to insert a picture to a worksheet? I
have tried recording the process but have not been succesful. I want to insert graphic C:\pictures\Test.gif into cell C3. This one is actually pretty cool: http://www.EXCELGAARD.dk/Lib/PictureCell/ CE |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub testme01() Dim myPict As Picture Dim myPictName As String myPictName = "C:\test.jpg" With ActiveSheet With .Range("c3") Set myPict = .Parent.Pictures.Insert(Filename:=myPictName) myPict.Top = .Top myPict.Left = .Left myPict.Width = .Width myPict.Height = .Height myPict.Name = "Pict_" & .Cells(1).Address(0, 0) End With End With End Sub I'm not sure if you want to fix the .width or the .height, though. ordnance1 wrote: Is there any way (using code) to insert a picture to a worksheet? I have tried recording the process but have not been succesful. I want to insert graphic C:\pictures\Test.gif into cell C3. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't rename or inset a tab | Excel Discussion (Misc queries) | |||
how to inset a picture in a cell and make it stay in that cell | Excel Discussion (Misc queries) | |||
Cell Inset? | New Users to Excel | |||
inset vba module using vba | Excel Programming |