Change cell data using a mouse click?

P

princejim

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

Gord Dibben

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
 
P

princejim

'Gord Dibben[_2_ said:
;1608920']Right-click on sheet tab and "View Code" to open shee
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
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 use so
any help would be much appriciated.-


Thanks Gord, brill just what I wanted, that makes the job of data entr
easy
 
G

Gord Dibben

You're welcome.

Gord

'Gord Dibben[_2_ said:
;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
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top