LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default SelectionChange problem

That's it! It works now. Tricky little suckers eh? Thank you very much for
all your efforts. Regards, Brett.

"CmK" wrote:

Hi again

You dont really have to re reference the range name to include all the
merged cells
Justr use Range("MyRangeName").Mergearea.address

Anyways I have done some testing
Heres the codes i used
and it worked fine
I hope this helped
My range name was Cell and A1 to C2

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim MyTestString As Variant
Dim oMergearea As Object
Set oMergearea = Range("Cell").MergeArea

MyTestString = oMergearea.Cells(1, 1).Value

If Target.Address = oMergearea.Address And MyTestString = "AAAA" Then
MsgBox "True"
Else
MsgBox "false"
End If


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
SelectionChange Alex McDermott Excel Programming 1 May 3rd 07 03:54 PM
Worksheet selectionChange problem Sammie Excel Programming 6 March 30th 07 04:12 PM
Button Visibility / Selectionchange Problem mastermind Excel Programming 3 January 11th 07 10:08 PM
selectionchange problem micher Excel Programming 2 January 27th 04 07:15 PM
SelectionChange problem Micher Excel Programming 0 January 23rd 04 10:26 PM


All times are GMT +1. The time now is 11:24 AM.

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"