View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Garman Steve Garman is offline
external usenet poster
 
Posts: 107
Default Optimize Time In Filling Cells

rfs04 wrote:
Hello all,

Does anybody know if it's possible to make excel putting a cross or a
circle or whatever in a cell only by clicking on it and if you click
again it disappears??

Maybe its science fiction?


If you'd settle for a right-click you could try something like:
'''
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Select Case Target.Formula
Case "": Target.Formula = "X"
Case "X": Target.Formula = "O"
Case Else: Target.Formula = ""
End Select
Cancel = True
End Sub
'''
Though you might want to check the range you are in.

For instance add:

If Target.Row 3 Or Target.Column 3 Then Exit Sub

before the Select Case if you're playing noughts & crosses (tic-tac-toe)

--
Steve Garman