#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Doubleclick

If I double click a cell in column B, I'd like a tick to appear in the cell.
Formatting the font in a cell to Wingdings2 and using the character 'P' will
give a tick.
Any ideas?
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Doubleclick

Hi Jock,

You must past the code below into the worksheet Code that you want to
use.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Application.Intersect(Target, Columns("B:B")) Is Nothing Then
With Selection.Font
.Name = "Wingdings 2"
.Size = 10
End With
ActiveCell = "P"
End If

End Sub


Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Doubleclick

Thanks Les. Works great until I password protect the worksheet.
The (amended) code below does the job but after every doubleclick although
the tick appears, so does a message saying the cell is protected and
therefore read only.
What a pain! Any ideas?

Private Sub Worksheet_BeforeSingleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveSheet.Unprotect Password:="sulby"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Application.Intersect(Target, Columns("B:B")) Is Nothing Then
ActiveCell = "P"
With Selection.Font
.Name = "Wingdings 2"
.Size = 10
End With
End If

ws_exit:
Application.EnableEvents = True
ActiveSheet.Protect Password:="sulby"
End Sub

Thanks
--
Traa Dy Liooar

Jock


"Les Stout" wrote:

Hi Jock,

You must past the code below into the worksheet Code that you want to
use.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Application.Intersect(Target, Columns("B:B")) Is Nothing Then
With Selection.Font
.Name = "Wingdings 2"
.Size = 10
End With
ActiveCell = "P"
End If

End Sub


Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

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
Doubleclick smandula Excel Programming 3 October 12th 07 01:47 AM
ON.DOUBLECLICK function C Brandt Excel Discussion (Misc queries) 8 May 20th 07 12:27 AM
DoubleClick Method? mickey Excel Programming 4 February 1st 07 03:39 PM
doubleclick PH NEWS Excel Worksheet Functions 1 March 10th 06 11:54 AM
Before DoubleClick John Pierce Excel Programming 1 October 28th 03 01:47 PM


All times are GMT +1. The time now is 01:16 PM.

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

About Us

"It's about Microsoft Excel"