use macro to hide or show bitmap image

J

John Davies

I have scanned my signature and saved it as a bitmap image that I would like
to use in an Excel spreadsheet. However I do not want the signature to be
visible all the time. Is it possible to assign the bitmap to a macro button
that will change the colour of the bitmap to the background colour of the
sheet to make it invisible and vice versa.
 
N

Norman Jones

Hi John,

Try something like:


Private Sub CommandButton1_Click()
With ActiveSheet.Shapes("Picture 1") '<<===== CHANGE
.Visible = Not .Visible
End With
End Sub

The button will toggle the display of the bitmap,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top