The following snippet works fine in Excel 2016 32bit to set cell borders. However, the same code crashes in Excel 360 64bit with an error on what ever method accesses the border object immediately following the .TintAndShade. If the script is exited after the .TintAndShade without accessing the border object again, the workbook will not save. Excel reports it as corrupted and cannot recover it, even though it looks fine on the screen. It appears that something in the .TintAndShade and nuking the cell border.
I was able to work around this just by not setting .TintAndShade and leaving it as the default, so I don't really need a workaround. I would like to know if this is a known issue or if I am using .TintAndShade wrong?
Thoughts?
<selecting some range of cells>
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 1
.TintAndShade = 0
.Weight = xlThin
End With
Thanks,
G^2