[VBA] Edit custom border

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to edit a non-default border in a sheet. I want to edit the amount of Horizontal- and Vertical- Zone Count to be more specific. Basically the border is the exactly the same as the default border, however some extra lines have been added and other text styles are being used.
I can add the border using:
Sheet.AddBorder( BorderDefinition As Variant, [PromptStrings] As Variant ) As Border
I can't control any part of the Border Object after adding it to the sheet. (And I have no clue what PromptStrings does.)
However when I compare the AddBorder method with AddDefaultBorder method:
Sheet.AddDefaultBorder( [HorizontalZoneCount] As Variant, [HorizontalZoneLabelMode] As Variant, _ [VerticalZoneCount] As Variant, [VerticalZoneLabelMode] As Variant, _ [LabelFromBottomRight] As Variant, [DelimitByLines] As Variant, _ [Centermarks] As Variant, [TopMargin] As Variant, _ [BottomMargin] As Variant, [LeftMargin] As Variant, _ [RightMargin] As Variant, [TextStyle] As Variant, _ [TextLayer] As Variant, [LineLayer] As Variant ) As DefaultBorder
The user has way more control over every or any aspect of the border.
Also the Border Object is controlled differently compared to the DefaultBorder Object. Border Object basically is very very limitted and DefaultBorder Object is not. However when I try to edit both borders by hand, using "Edit Instance" both borders are controlled very similar.
So... Using VBA, how does one edit the amount of Horizontal and Vertical Zones in a non-default border? Or is there a way to make the custom border default?
Kind regards