Code: Select all
Function HTMLTableRow (rSource01 as range, Optional rSource02 as range)
Dim i as Integer
Dim sReturn as string
sReturn = "[tr]"
for i = 1 to uBound(rSource01, 2)
sReturn = sReturn + HTMLTableCell(rSource01(1, i))
next i
if not IsMissing(rSource02) then
for i = 1 to uBound(rSource02, 2)
sReturn = sReturn + HTMLTableCell(rSource02(1, i))
next i
end if
sReturn = sReturn + "[/tr]"
HTMLTableRow = sReturn
End Function
Function HTMLTableCell (sValue, Optional bBold as Boolean, Optional bItalic as Boolean)
if IsMissing(bBold) then
bBold = false
end if
if IsMissing(bItalic) then
bItalic = false
end if
HTMLTableCell = "[td]"
if bBold then
HTMLTableCell = HTMLTableCell + "[b]"
end if
if bItalic then
HTMLTableCell = HTMLTableCell + "[i]"
end if
HTMLTableCell = HTMLTableCell + sValue
if bItalic then
HTMLTableCell = HTMLTableCell + "[/i]"
end if
if bBold then
HTMLTableCell = HTMLTableCell + "[/b]"
end if
HTMLTableCell = HTMLTableCell + "[/td]"
End Function
I apologise if this has been previously answered, but my google searching has failed to find the answer.