ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to change picture (https://www.excelbanter.com/excel-worksheet-functions/219397-how-change-picture.html)

How to change Picture in excel software

How to change picture
 
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.........

joel

How to change picture
 
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


"How to change Picture in excel software" wrote:

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.........



All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com