I'm trying to figure out the particular border style of cell within a workbook that I received. The normal way to do this would be ctrl 1->Border and look at the style. However, the style for this particular cell is blanked out and I suspect that the border is formatted using a proprietary style. How do I get the properties of this border style (I guess with VBA?) in order to set up my own macro which then applies this particular border style to other cells?
I hope someone can help me out here.
EDIT:
CodePudding user response:
I believe you need to add bold white borders to the left and right-hand sides of the cell to generate the effect.
CodePudding user response:
In Excel, select the cell with the border in question.
Change to the VBE environment (Alt F11). Open the Immediate Window (Ctrl G). Type in the immediate window:
? ActiveCell.Borders(xlEdgeBottom).LineStyle
And
? ActiveCell.Borders(xlEdgeBottom).Weight
Compare the values with the documentation:
https://docs.microsoft.com/en-us/office/vba/api/excel.xllinestyle
https://docs.microsoft.com/en-us/office/vba/api/excel.xlborderweight
It would surprise me it one of the two values cannot be found in the lists.