Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Enter value in cell by selecting cell.

When I move the mouse cursor over a cell and click to select the cell I would
like for an "X" to be placed in the cell without entering the "X" with a
keyboard stroke. How do I accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Enter value in cell by selecting cell.

How about using doubleclicking and rightclicking:

Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub

Cancel = True 'stop editing in cell
Target.Value = "X"
End Sub

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub

Cancel = True 'stop pop up from showing
Target.Value = ""
End Sub

I used any cell in Column A. You can change that in both spots if you want.
Doubleclicking will add the X. Rightclicking will empty the cell.

Greyson wrote:

When I move the mouse cursor over a cell and click to select the cell I would
like for an "X" to be placed in the cell without entering the "X" with a
keyboard stroke. How do I accomplish this?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Enter value in cell by selecting cell.

ps.

If you want to try, rightclick on the worksheet tab that should have this
behavior. Select view code and paste that code into the code window.

Greyson wrote:

When I move the mouse cursor over a cell and click to select the cell I would
like for an "X" to be placed in the cell without entering the "X" with a
keyboard stroke. How do I accomplish this?


--

Dave Peterson
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
Hit enter in cell & move text down in cell, not go to cell below. raoul_duke Excel Worksheet Functions 4 April 2nd 23 08:37 PM
Need help with an embedded IF statement Lari Excel Worksheet Functions 8 June 17th 06 04:59 PM
Enter 2 dates in same excel cell m_a_turcotte Excel Discussion (Misc queries) 4 May 16th 06 08:15 PM
Hitting Enter to Move Cursor to the Next Entry Cell Cisnerax Excel Worksheet Functions 3 February 25th 06 12:04 PM
Stop next cell being selected on Enter Ken G. Excel Discussion (Misc queries) 2 December 6th 05 08:21 AM


All times are GMT +1. The time now is 04:21 PM.

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"