Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default wrksheet selection change

The following code works perfectly in cell that is not merged:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("CHECK.NOTES").Address And
Range("CHECK.NOTES").Value = "END NOTES CHECK" Then
Application.Run "PERSONAL.xls!END_NOTES_CHECK"
End If
End Sub

but if the cell is merged it goes to debug. I have been careful to make sure
that the cell name is defined as the full merge range (eg $G$5:$J$6).
What am I missing please? Regards, Brett
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default wrksheet selection change

Can you specify the error message and the line that failed. The problem
could be in the macro "PERSONAL.xls!END_NOTES_CHECK"

"Brettjg" wrote:

The following code works perfectly in cell that is not merged:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("CHECK.NOTES").Address And
Range("CHECK.NOTES").Value = "END NOTES CHECK" Then
Application.Run "PERSONAL.xls!END_NOTES_CHECK"
End If
End Sub

but if the cell is merged it goes to debug. I have been careful to make sure
that the cell name is defined as the full merge range (eg $G$5:$J$6).
What am I missing please? Regards, Brett

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default wrksheet selection change

Hi Joel, Error 13, Type Mismatch. The macro is dead simple:


Sub END_NOTES_CHECK()
With Range("CHECK.NOTES"): .Font.ColorIndex = 39: .Interior.ColorIndex =
39: .ClearContents: End With
ActiveWindow.View = xlPageBreakPreviewSheets("LAUNCHPAD").Select
Sheets("LAUNCHPAD").Shapes("GP final routine").ZOrder msoBringToFront
Sheets("LAUNCHPAD").Shapes("GP final msg").ZOrder msoBringToFront
ActiveWorkbook.Save
End Sub

Brett
"Joel" wrote:

Can you specify the error message and the line that failed. The problem
could be in the macro "PERSONAL.xls!END_NOTES_CHECK"

"Brettjg" wrote:

The following code works perfectly in cell that is not merged:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("CHECK.NOTES").Address And
Range("CHECK.NOTES").Value = "END NOTES CHECK" Then
Application.Run "PERSONAL.xls!END_NOTES_CHECK"
End If
End Sub

but if the cell is merged it goes to debug. I have been careful to make sure
that the cell name is defined as the full merge range (eg $G$5:$J$6).
What am I missing please? Regards, Brett

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default wrksheet selection change

In fact, it doesn't matter which cell I click, it goes to the same error. As
soon as I unmerge the cell, and change the name range it works perfectly
again. Brett.

"Joel" wrote:

Can you specify the error message and the line that failed. The problem
could be in the macro "PERSONAL.xls!END_NOTES_CHECK"

"Brettjg" wrote:

The following code works perfectly in cell that is not merged:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("CHECK.NOTES").Address And
Range("CHECK.NOTES").Value = "END NOTES CHECK" Then
Application.Run "PERSONAL.xls!END_NOTES_CHECK"
End If
End Sub

but if the cell is merged it goes to debug. I have been careful to make sure
that the cell name is defined as the full merge range (eg $G$5:$J$6).
What am I missing please? Regards, Brett

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default wrksheet selection change

Hi Joel, a little bit me more info: if I unmerge the cells and leave the name
range as $G$5:$G$6 it goes to the same error (and also on any cell that I
click). Not sure if that helps. Brett

"Joel" wrote:

Can you specify the error message and the line that failed. The problem
could be in the macro "PERSONAL.xls!END_NOTES_CHECK"

"Brettjg" wrote:

The following code works perfectly in cell that is not merged:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("CHECK.NOTES").Address And
Range("CHECK.NOTES").Value = "END NOTES CHECK" Then
Application.Run "PERSONAL.xls!END_NOTES_CHECK"
End If
End Sub

but if the cell is merged it goes to debug. I have been careful to make sure
that the cell name is defined as the full merge range (eg $G$5:$J$6).
What am I missing please? Regards, Brett



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
to report change in wrksheet in another sheet, not usin track chan Epoch Excel Discussion (Misc queries) 0 June 26th 08 10:04 PM
How do I keep a "running total" from wrksheet to wrksheet? pwrlifter1 Excel Worksheet Functions 0 June 6th 07 08:13 PM
Change from Column Selection to Cell Selection Lil Pun[_16_] Excel Programming 4 June 16th 06 10:38 PM
PLEASE HELP - Pasting Cells to WrkSheet with Hidden Columns Rob the Winer Excel Worksheet Functions 7 October 5th 05 03:41 AM
getting data from cells in wrksheet & importing in existing works drg34 Excel Discussion (Misc queries) 1 March 23rd 05 09:14 AM


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