hello, is it possible to assign a macro to a button that will hide a specified image on the worksheet/or show if it's hidden?
hello, is it possible to assign a macro to a button that will hide a specified image on the worksheet/or show if it's hidden?
Last edited by redbullah; 05-04-2010 at 12:21 PM.
Something like this should do the trick:
![]()
Sub Test() With Sheets("Sheet1").Shapes("Picture 1") If .Visible Then .Visible = False Else .Visible = True End If End With End Sub
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
thanks but i don't know where picture1 is. i have multiple images on my worksheet, so how can i assign them names?
If you select a picture it's name will appear in the Name Box in the top left hand corner of the screen.
Dom
thanks for your time Domski, it surely did the tricki just wrote the name of my worksheet that includes the images that i want to hide instead of Sheet1, and the name of the picture instead of Picture 1 and it worked!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks