Border around problem

A

AJ

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
 
A

AJ

Did not remove the error.

In addition to the origianl code... I have these 2 macros. I still don't
understand why the border around the active cell disappears to start with.

Sub Button9_Click()
'
' Button9_Click Macro
' Macro recorded 8/20/2008 by Anna Garrison
'

'
Sheets(Array("Front Page MBR", "Printing MBR", "Bottle Opening MBR", _
"Production MBR")).Select
Sheets("Front Page MBR").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


End Sub


Sub Button11_Click()
'
' Button11_Click Macro
' Macro recorded 9/2/2008 by Anna Garrison
'

'
Sheets(Array("Front Page MBR", "Production MBR")).Select
Sheets("Front Page MBR").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True


End Sub



Thanks for the help, I do appreciate it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top