How to change picture

  • Thread starter How to change Picture in excel software
  • Start date
H

How to change Picture in excel software

hello...I am making one software in excel and i want to change picture when i
am click on that picture name in list box.........
 
J

Joel

PictName = ActiveSheet.ListBox1.Text
Set OldPict = ActiveSheet.Shapes(PictName)
PictLeft = OldPict.Left
PictTop = OldPict.Top
PictWidth = OldPict.Width
PictHeight = OldPict.Height
OldPict.Delete

Set NewPict = ActiveSheet.Pictures.Insert("H:\My Documents\My
Pictures\lincoln.jpg")
NewPict.Left = PictLeft
NewPict.Top = PictTop
NewPict.Width = PictWidth
NewPict.Height = PictHeight
 

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