I’m trying to write a subroutine which would erase contents (numeric values and strings) of an existing named range. When I run it, I get an error saying that the clearContents property or method is not found. What am I doing wrong here?
sub ClearMyNamedRange()
dim currDocRanges as object
dim currRange as object
currDocRanges = ThisComponent.NamedRanges
currRange = currDocRanges.getByName("_ItemList")
currRange.clearContents(5)
end sub
Any suggestions would be greatly appreciated.