How to change picture

  • Thread starter Thread starter How to change Picture in excel software
  • Start date 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.........
 
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
 
Back
Top