View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Image controled by VB tools

Hi,

With an image in the spreadsheet and the cursor in a cell, turn on the Macro
Recorder and select the image, then turn off the recorder and view your code.
This will tell you what the object name currently is, then add the following
code to the Sheet1 object (or whatever sheet your object is on). This is
done in the VBE by double-clicking the sheet name in the top left corner of
the screen.

Private Sub CheckBox1_Click()
If Me.CheckBox1 = True Then
ActiveSheet.Shapes("Picture 12").Visible = True
Else
ActiveSheet.Shapes("Picture 12").Visible = False
End If
End Sub


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"jorlypong" wrote:

How do I turn on and off the visibility of an image using a radio button or
check box? My problem is in having VB locate the image. How do I name the
image so I may then refernce it in VB?