Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
to report change in wrksheet in another sheet, not usin track chan | Excel Discussion (Misc queries) | |||
How do I keep a "running total" from wrksheet to wrksheet? | Excel Worksheet Functions | |||
Change from Column Selection to Cell Selection | Excel Programming | |||
PLEASE HELP - Pasting Cells to WrkSheet with Hidden Columns | Excel Worksheet Functions | |||
getting data from cells in wrksheet & importing in existing works | Excel Discussion (Misc queries) |