View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EP EP is offline
external usenet poster
 
Posts: 5
Default Mouse click automatically enters character into cell.

right click on the Sheet you want to add the code to and select "View
Code" then the VB window will open and past the following:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
Target.Font.Name = "Wingdings 2"
Target.Value = Chr(80)
End Sub



Jeffrey M. Coffin wrote:
How does one enter worksheet code?

"Gary''s Student" wrote:

Cancel = True
is the second line. above it is the first line - all one line.

REMEMBER worksheet code, not a standard module
--
Gary''s Student - gsnu200730


"Jeffrey M. Coffin" wrote:

Not getting it to run. Boolean) is on the second line (separate from the
start of the parenthetical expression. Is that intended?

"Gary''s Student" wrote:

How about a double-click??

Put this in worksheet code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
Target.Font.Name = "Wingdings 2"
Target.Value = Chr(80)
End Sub


--
Gary''s Student - gsnu200730


"Jeffrey M. Coffin" wrote:

How can I set up a cell to respond to a mouse click by entering a check mark?