How do i select an inserted image.

S

SpeeD

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
 
P

Patrick Molloy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top