Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Mouse click automatically enters character into cell.

How can I set up a cell to respond to a mouse click by entering a check mark?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Mouse click automatically enters character into cell.

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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Mouse click automatically enters character into cell.

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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,080
Default Mouse click automatically enters character into cell.

"Cancel As Boolean" is a single phrase.

__________________________________________________ _______________________

"Jeffrey M. Coffin" wrote in
message ...
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?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Mouse click automatically enters character into cell.

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?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Mouse click automatically enters character into cell.

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?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Mouse click automatically enters character into cell.

Navigate to the sheet where you want this to happen.
Right click on the sheet tab and select View Code
Paste the code into the right side of the window that opens.
Click the "X" to close the VBE and return to Excel.

Double click in a cell and see if it works.

Biff

"Jeffrey M. Coffin" wrote in
message ...
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?



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Mouse click automatically enters character into cell.

Hi All,
Would it be possible to do this on one click by pre-populating the cells
with check marks in a white font and then having the color changed to black
on the click event?

If so, how would one go about creating the code for that to happen
automatically?

"Jeffrey M. Coffin" wrote:

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

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Mouse click automatically enters character into cell.

Hi Renee:

Your method would also work. I would still implement it with double-click.
The problem with single-click is that the event triggers on ANY selection,
not just the mouse. So moving into the cell with the arrow keys would also
trip the action.
--
Gary''s Student - gsnu200730


"Renee R." wrote:

Hi All,
Would it be possible to do this on one click by pre-populating the cells
with check marks in a white font and then having the color changed to black
on the click event?

If so, how would one go about creating the code for that to happen
automatically?

"Jeffrey M. Coffin" wrote:

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

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,080
Default Mouse click automatically enters character into cell.

Minor clarification: there is no Click or BeforeClick event for the
worksheet, so you would use the SelectionChange method which, as you point
out, has other triggers.

The BeforeRightClick method could be substituted for the BeforeDoubleClick
method if the OP doesn't want to click twice. <g
__________________________________________________ ______________________

"Gary''s Student" wrote in message
...
Hi Renee:

Your method would also work. I would still implement it with
double-click.
The problem with single-click is that the event triggers on ANY selection,
not just the mouse. So moving into the cell with the arrow keys would
also
trip the action.
--
Gary''s Student - gsnu200730


"Renee R." wrote:

Hi All,
Would it be possible to do this on one click by pre-populating the cells
with check marks in a white font and then having the color changed to
black
on the click event?

If so, how would one go about creating the code for that to happen
automatically?

"Jeffrey M. Coffin" wrote:

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





  #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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I click in a cell & it acts like I am holding onto the left mouse koverheul Excel Discussion (Misc queries) 3 May 16th 07 01:36 AM
double click mouse, move to referenced wkbk/cell Allison Setting up and Configuration of Excel 1 December 20th 05 09:51 PM
Master worksheet automatically enters data into sub worksheets Ken Excel Discussion (Misc queries) 1 November 1st 05 10:36 PM
Opening a URL in a cell without a mouse click trountree Excel Discussion (Misc queries) 0 October 5th 05 04:41 PM
Add cell value with mouse click cbrasted Excel Discussion (Misc queries) 4 April 27th 05 01:36 AM


All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"