LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Selection change code with merged cells

Happy new year everyone.

I have an issue with the code below and wondered if there was a way to get
round the problem.

The issue is that R11:S11 and R12:S12 are merged cells. With single cells,
the code toggles between a tick (Wingdings character 252) and blank when
each cell is selected. With merged cells nothing happens.

Is there a way to enable the code when the cells are merged?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----- ENABLE TICKS IN RELEVANT BOXES -----
Application.EnableEvents = False
On Error GoTo sub_exit
With Worksheets("Sheet1")
Set rTick = Worksheets("Sheet1").Range("R11:S12")
If Not Intersect(Target, rTick) Is Nothing Then
With Target
If .Value = Chr(252) Then
.Value = ""
Else
.Value = Chr(252)
.Font.Name = "Wingdings"
End If
End With
End If
End With
sub_exit:
Application.EnableEvents = True
End Sub


 
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
Probklem with code, when merged cells Jan Kronsell Excel Programming 2 November 21st 08 10:24 AM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Problem with code for merged cells SuitedAces[_25_] Excel Programming 5 July 7th 06 09:40 PM
changing merged cells from code john Excel Programming 7 July 6th 05 10:24 PM
Fine-tuning selection change event for merged cells & wrap text Lucy Barber Excel Programming 0 September 7th 04 10:10 PM


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