Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code to hide pages in a worksheet so they don't print
when not needed. If I leave the With Activecell.borderaround code out, for some reason unknown to me, the border around the active cell disappears. WHen I put the code in some computers get a RUntime error on the code. I have checked, we all have SP3 and we all have the same add-ins. Does anyone have thoughts on correction to this problem? Thank you, Private Sub Worksheet_SelectionChange(ByVal target As Range) If Cells(1, 13) = True Then Worksheets("Printing MBR").Rows("8:66").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("8:66").EntireRow.Hidden = False End If If Cells(2, 13) = True Then Worksheets("Printing MBR").Rows("67:125").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("67:125").EntireRow.Hidden = False End If If Cells(3, 13) = True Then Worksheets("Printing MBR").Rows("126:185").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("126:185").EntireRow.Hidden = False End If With ActiveCell.BorderAround End With End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() With ActiveCell .BorderAround LineStyle:=xlContinuous End With "AJ" wrote: I have the following code to hide pages in a worksheet so they don't print when not needed. If I leave the With Activecell.borderaround code out, for some reason unknown to me, the border around the active cell disappears. WHen I put the code in some computers get a RUntime error on the code. I have checked, we all have SP3 and we all have the same add-ins. Does anyone have thoughts on correction to this problem? Thank you, Private Sub Worksheet_SelectionChange(ByVal target As Range) If Cells(1, 13) = True Then Worksheets("Printing MBR").Rows("8:66").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("8:66").EntireRow.Hidden = False End If If Cells(2, 13) = True Then Worksheets("Printing MBR").Rows("67:125").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("67:125").EntireRow.Hidden = False End If If Cells(3, 13) = True Then Worksheets("Printing MBR").Rows("126:185").EntireRow.Hidden = True Else Worksheets("Printing MBR").Rows("126:185").EntireRow.Hidden = False End If With ActiveCell.BorderAround End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Border Problem | Excel Discussion (Misc queries) | |||
Border Problem | Excel Programming | |||
Cell border problem | Excel Discussion (Misc queries) | |||
Default Border Color Problem | Excel Discussion (Misc queries) | |||
Border problem with one row but no snag in many rows | Excel Programming |