![]() |
Find a picture on a worksheet
Hi,
I it possible to serach for a picture on a worksheet via VBA, I'm trying to see if a particular picture is visible on a worksheet if not then copy from another another worksheet? Thanks! |
Find a picture on a worksheet
Maybe...
Do you know the name of the picture--not the filename that you used to insert the picture--the name that appears in the namebox (to the left of the formulabar) when you select that picture. Or maybe by its location??? MM User wrote: Hi, I it possible to serach for a picture on a worksheet via VBA, I'm trying to see if a particular picture is visible on a worksheet if not then copy from another another worksheet? Thanks! -- Dave Peterson |
Find a picture on a worksheet
Thanks Dave, yes I know its name (it will be "panel1")
Regards "Dave Peterson" wrote in message ... Maybe... Do you know the name of the picture--not the filename that you used to insert the picture--the name that appears in the namebox (to the left of the formulabar) when you select that picture. Or maybe by its location??? MM User wrote: Hi, I it possible to serach for a picture on a worksheet via VBA, I'm trying to see if a particular picture is visible on a worksheet if not then copy from another another worksheet? Thanks! -- Dave Peterson |
Find a picture on a worksheet
You can use something like:
dim myPict as Picture set mypict = nothing on error resume next set mypict = worksheets("Somesheetnamehere").pictures("Panel1") on error goto 0 if mypict is nothing then 'it's not there else 'it's already there if mypict.visible = false then 'make it visible??? mypict.visible = true end if end if MM User wrote: Thanks Dave, yes I know its name (it will be "panel1") Regards "Dave Peterson" wrote in message ... Maybe... Do you know the name of the picture--not the filename that you used to insert the picture--the name that appears in the namebox (to the left of the formulabar) when you select that picture. Or maybe by its location??? MM User wrote: Hi, I it possible to serach for a picture on a worksheet via VBA, I'm trying to see if a particular picture is visible on a worksheet if not then copy from another another worksheet? Thanks! -- Dave Peterson -- Dave Peterson |
Find a picture on a worksheet
Thanks Dave, thats what I was after!
"Dave Peterson" wrote in message ... You can use something like: dim myPict as Picture set mypict = nothing on error resume next set mypict = worksheets("Somesheetnamehere").pictures("Panel1") on error goto 0 if mypict is nothing then 'it's not there else 'it's already there if mypict.visible = false then 'make it visible??? mypict.visible = true end if end if MM User wrote: Thanks Dave, yes I know its name (it will be "panel1") Regards "Dave Peterson" wrote in message ... Maybe... Do you know the name of the picture--not the filename that you used to insert the picture--the name that appears in the namebox (to the left of the formulabar) when you select that picture. Or maybe by its location??? MM User wrote: Hi, I it possible to serach for a picture on a worksheet via VBA, I'm trying to see if a particular picture is visible on a worksheet if not then copy from another another worksheet? Thanks! -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 06:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com