ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I want to double click a box and have an X inserted there? (https://www.excelbanter.com/excel-worksheet-functions/161498-i-want-double-click-box-have-x-inserted-there.html)

JLM

I want to double click a box and have an X inserted there?
 
I am setting up a cover sheet that I want to have the user double click a box
and have an X inserted in the box or a check. How do I complete this task?

Gord Dibben

I want to double click a box and have an X inserted there?
 
What is a "box"? A cell?

You would need event code to achieve the double-click in a cell.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Target.Value = "a"
Target.Font.Name = "Marlett"
Cancel = True
End Sub

Might be easier to format the cell to Marlett font and just type an "a" to
return a checkmark and dispense with the double-clicking.


Gord Dibben MS Excel MVP

On Tue, 9 Oct 2007 12:49:02 -0700, JLM wrote:

I am setting up a cover sheet that I want to have the user double click a box
and have an X inserted in the box or a check. How do I complete this task?



JLM

I want to double click a box and have an X inserted there?
 
You are correct, I am using a cell with a border and I wish it to be filled
in when double clicking on the cell kind of like in word. I am using this
to create a pricing system and linking this to numerical data.

"Gord Dibben" wrote:

What is a "box"? A cell?

You would need event code to achieve the double-click in a cell.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Target.Value = "a"
Target.Font.Name = "Marlett"
Cancel = True
End Sub

Might be easier to format the cell to Marlett font and just type an "a" to
return a checkmark and dispense with the double-clicking.


Gord Dibben MS Excel MVP

On Tue, 9 Oct 2007 12:49:02 -0700, JLM wrote:

I am setting up a cover sheet that I want to have the user double click a box
and have an X inserted in the box or a check. How do I complete this task?




Gord Dibben

I want to double click a box and have an X inserted there?
 
Then either of the methods I gave will enter a checkmark in the cell.

How you would link these to numeric data is another problem which I hope you
have solved.


Gord

On Tue, 9 Oct 2007 13:57:00 -0700, JLM wrote:

You are correct, I am using a cell with a border and I wish it to be filled
in when double clicking on the cell kind of like in word. I am using this
to create a pricing system and linking this to numerical data.

"Gord Dibben" wrote:

What is a "box"? A cell?

You would need event code to achieve the double-click in a cell.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
Target.Value = "a"
Target.Font.Name = "Marlett"
Cancel = True
End Sub

Might be easier to format the cell to Marlett font and just type an "a" to
return a checkmark and dispense with the double-clicking.


Gord Dibben MS Excel MVP

On Tue, 9 Oct 2007 12:49:02 -0700, JLM wrote:

I am setting up a cover sheet that I want to have the user double click a box
and have an X inserted in the box or a check. How do I complete this task?






All times are GMT +1. The time now is 12:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com