Hi Folks,
I have a macro that iterates over a small range copying the format from each cell in that range to a set of cells in a second range. I don’t know how to address the formatting of the cells:
sub Format
dim sht as object
dim src as object
dim dst as object
dim r,c,f as integer
sht = ThisComponent.CurrentController.ActiveSheet
src = sht.getCellRangeByName("TLFA")
dst = sht.getCellRangeByName("TLFR")
for r = LBound(dst.data) to UBound(dst.data)
for c = LBound(dst.data(r)) to UBound(dst.data(r))
for f = LBound(src.data) to UBound(src.data)
if dst.data(r)(c) <= src.data(f)(0) then
dst.data(r)(c).format = src.data(f)(0).format <== This line is a guess and it is wrong.
end if
next f
next c
next r
end sub
Thanks for the help,
Chris.