Picture popup

T

TheSAguy

In Excel, What will the code be to display a picture on the screen if
button is pressed?

I have a button, if pressed, needs to open a MsgBox or somethin
displaying a picture.

Thanks
 
T

TheSAguy

TheSAguy;670076 said:
In Excel, What will the code be to display a picture on the screen if
button is pressed?

I have a button, if pressed, needs to open a MsgBox or somethin
displaying a picture.

Thanks.

Anyone please?
 
D

Dave Peterson

I put a button from the Forms Toolbar on the worksheet.
I added a picture named "Picture 1" right near that button.

I assigned this macro to the button:

Option Explicit
Sub testme()
Dim myPict As Picture
Set myPict = ActiveSheet.Pictures("Picture 1")
myPict.Visible = Not myPict.Visible
End Sub

Clicking the button toggles the visibility of the picture.
 
Top