Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Change cell data using a mouse click?

I have tables with lots of cells containing a zero, I would like to change cells at random to a 1 just by clicking on the cell, new user so any help would be much appriciated.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 621
Default Change cell data using a mouse click?

Right-click on sheet tab and "View Code" to open sheet module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord

On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:


I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user so
any help would be much appriciated.

  #3   Report Post  
Junior Member
 
Posts: 3
Talking

Quote:
Originally Posted by Gord Dibben[_2_] View Post
Right-click on sheet tab and "View Code" to open sheet module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord




On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:


I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user so
any help would be much appriciated.

Thanks Gord, brill just what I wanted, that makes the job of data entry easy.
  #4   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by princejim View Post
Thanks Gord, brill just what I wanted, that makes the job of data entry easy.
That works great however I have added another sum box, which the input can be manual, but could it be made automatic.

form
heading
H L
1 0
0 0
0 0
Total correct
1 0
Total tests
6

When using the above programm, double clicking on the first zero changes it to a 1. Clicking on any zero it would change to a 1(great)

H an L are tests, so the pupil takes 6 tests in all: Is there away in which I can still double click for the 1 and just 1 click on the zero to automatically increment the total test cell? So in this case I would double click first cell (H colum) and get a 1 also 1 in the total test cell, then just a single click in all the other cells, this would leave the zero and would just increment the total test cell?

Last edited by princejim : January 29th 13 at 08:48 PM
  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 621
Default Change cell data using a mouse click?

You're welcome.

Gord

On Mon, 28 Jan 2013 09:11:47 +0000, princejim
wrote:


'Gord Dibben[_2_ Wrote:
;1608920']Right-click on sheet tab and "View Code" to open sheet
module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord




On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:
-

I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user

so
any help would be much appriciated.-



Thanks Gord, brill just what I wanted, that makes the job of data entry
easy.

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
How to click a cell with mouse and have a different tab appear Randy Carriere Excel Programming 4 June 22nd 08 03:21 AM
How to change action of double-click left mouse button? MouseControl Excel Discussion (Misc queries) 1 September 10th 07 11:50 PM
VBA - Click mouse to change cursor to cross hair that spans the en gary Excel Programming 26 May 26th 06 04:15 PM
Add cell value with mouse click cbrasted Excel Discussion (Misc queries) 4 April 27th 05 01:36 AM
get value of a cell with a mouse click Ken Wright Excel Programming 0 July 22nd 03 07:15 PM


All times are GMT +1. The time now is 03:53 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"