View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default How do i select an inserted image.

my demo:

Sub MoveIt()
Dim oPic As Shape

If ActiveSheet.Shapes.Count = 1 Then
Set oPic = ActiveSheet.Shapes(1)
With oPic
.Top = 0
.Left = 50
End With
End If
End Sub

"SpeeD" wrote:

Ho i´ve inserted an image in excel, but i need to make some ajustements
(position) as some columns are hidden or not...

How do i select in VBA an allready inserted image? (embeded)
i ned to do the folowing.... (but doenst work)

Dim myPict As Picture
With ActiveSheet.Range("p2")
Set myPict = ActiveSheet.Shapes("Picture18")
myPict.Top = .Top
myPict.Left = .Left - 50
myPict.Placement = xlMove

End With