Thanks, Jim,
This code is part of the Worksheet_calculate. I can make changes in several
different places and everything works fine. I can add Line Items, Edit Line
Items and all is good. As soon as I delete a Line Item I get this error on
the line below.
I see nothing that should affect the setting or getting of the LineStyle
Property for the borders. Also, it's the same grid. Why would I get an
error on the second one and not the first?
If .Borders(xlEdgeTop).LineStyle <> xlThin Then 'no error
If .Borders(xlEdgeTop).LineStyle <> xlLineStyleNone ' error here
At this point I don't know what I'm looking for and could use any
suggestions or guidance you may have.
Sub ChkCAMPool(ShName)
Debug.Print "Starting ChkCAMPool " & Sheets(ShName).Name
' Check if value in pools 10
' if value add borders to 2nd row of Pools
'Check CAM Pool
Dim Grid As Range
Set Grid = Sheets(ShName).Range("F34:N36")
With Grid
If Sheets(ShName).Range("F33").Value <> "" Then
If .Borders(xlEdgeTop).LineStyle <> xlThin Then
Call Formating.AddThinBorders(Grid)
End If
End If
If Sheets(ShName).Range("F33").Value = "" Then
If .Borders(xlEdgeTop).LineStyle <> xlLineStyleNone Then 'error
is here
Call Formating.RemoveBorders(Grid)
End If
End If
End With
End Sub
---
Thanks for your help.
Karen53
"Jim Cone" wrote:
>
> The code works for me.
> Also, xlNone and xlLineStyleNone are identical. Both have a value of -4142
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
> (Excel Add-ins / Excel Programming)
>
>