Hi Jim,
I did as you suggested and the message boxes came back with the correct
range and again just before the error with the correct range.
By including the parent sheet, do you mean this?
Set Grid = Sheets(ShName).Range("F34:N36")
If so, the parent sheet is included.
This is so frustrating!
--
Thanks for your help.
Karen53
"Jim Cone" wrote:
Just a guess, but maybe the line item (row?) you are deleting is affecting
the range returned by "Grid". Try running a msgbox with the Grid.Address
in a few spots and see if the range changes.
And since the code is in a worksheet module, make sure every range reference
includes the parent sheet.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"Karen53"
wrote in message
Jim, sorry scratch that about why the second and not the first...Duhhh. I'm
tired.
So, I'm left with I can add and remove borders using this code until I
delete a Line Item. Then I get this error.
--
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)