I’m trying to combine the two into one so both functions will be accomplished at once, any idea how I should combine the two?
Sub restoreTabColor
Dim oSheet As Variant
For Each oSheet In ThisComponent.getSheets()
oSheet.TabColor = -1
Next oSheet
End Sub
Sub demo()
doc = ThisComponent
rgs = doc.createInstance("com.sun.star.sheet.SheetCellRanges")
Dim aRgA As New com.sun.star.table.CellRangeAddress
With aRgA
.StartColumn = 2
.EndColumn = 22
.StartRow = 1
.EndRow = 1298
For j = 0 To 22
.sheet = j
rgs.addRangeAddress(aRgA, False)
Next j
End With
rgs.clearContents(1023) REM To clear all content
End Sub