How do I put this macro on a EXCEL sheet?

  • Thread starter Thread starter roger_home
  • Start date Start date
R

roger_home

I want to put this macro on a file...it is suppose to make a cell a
check box...where do I put it?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1")) Is Nothing Then
With Target
If .Value = "ü" Then
..Value = ""
Else
..Value = "ü"
..Font.Name = "Wingdings"
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub
 
view/toolbars/activex select checkbox and click on the sheet
right click the checkbox select code
“roger_homeâ€ç¼–写:
 

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

Back
Top